Skip to main content
16 events
when toggle format what by license comment
Sep 20, 2022 at 8:28 vote accept Chan Kim
Sep 20, 2022 at 3:01 comment added Chan Kim Ha.. I recevied a notice about someone answering to my question and I tried $ps -eax |& tee list1 again and it works now! I don't know what's happening..
Sep 18, 2022 at 19:59 answer added Eric Marceau timeline score: 0
Aug 31, 2022 at 13:37 comment added Chan Kim @MarcusMüller it says shell: SHELL: /bin/bash
Aug 31, 2022 at 13:11 comment added Stéphane Chazelas |& is the operator to start a co-process in ksh. ps -eax |& tee list1 would run ps -eax as a coproc and then start tee list1 in foreground with its stdin still on the terminal device (and hang there waiting for input).
Aug 31, 2022 at 13:08 comment added Marcus Müller @StéphaneChazelas oooh I didn't know that!
Aug 31, 2022 at 13:06 comment added Stéphane Chazelas @MarcusMüller, still 3.2 was the last one licensed under GPL2 which is probably why that's the one you find on macos.
Aug 31, 2022 at 12:58 comment added Marcus Müller @StéphaneChazelas (which would make it more likely the shell in question is not bash, csh or zsh; Bash 4 was, um, 2010?)
Aug 31, 2022 at 12:57 comment added Marcus Müller oh and I know this is a bit silly, but what does echo "shell: ${shell} SHELL: ${SHELL}" say?
Aug 31, 2022 at 12:56 comment added Stéphane Chazelas Also ls -ld list while we're at it.
Aug 31, 2022 at 12:55 comment added Marcus Müller maybe we need to do a sanity check on tee. What does type tee say? And tee --version?
Aug 31, 2022 at 12:55 comment added Stéphane Chazelas Note that you need bash 4.0 or newer for |& (short for 2>&1 |, |& being a csh operator initially). In older versions, I'd expect a syntax error though.
Aug 31, 2022 at 12:54 comment added Marcus Müller the problem is I can't reproduce this locally; my list1 is filled with the output of ps. So I thought maybe I was doing something wrong, and hence I asked for clarification.
Aug 31, 2022 at 12:50 comment added Chan Kim I usually did to catch stderr too.
Aug 31, 2022 at 12:48 comment added Marcus Müller what was the intention behind using |&?
Aug 31, 2022 at 12:46 history asked Chan Kim CC BY-SA 4.0