I have a question related to how to fork stdout in two directions but with a different twist. (I already know about tee! :)
I'd like the output both to appear as is (tee to console?) and to be piped to a further refinement.
Example: I have
ps -ef | grep -i something
now I'd like both to see this result and further refine it, e.g. with
| awk '{print "epwdx "$2}'
Of course I can run the two commands sequentially and capture all the results, but sometimes I'd like to run them as a unit, perhaps increasing the odds that they tell a consistent current truth.
Maybe there's a way using other tricks (such as -, 2>, &2, or the like), but I don't see one yet.
/dev/stdout
, that would go to the pipe again. – ilkkachu Mar 30 '17 at 11:15