|
|
|
|
|
by a3n
4112 days ago
|
|
Named pipes have been rare for me, but simple process substitution is every day. Very often I do something like this in quick succession. Command line editing makes this trivial. $ find . -name "*blarg*.cpp"
# Some output that looks like what I'm looking for.
# Run the same find again in a process, and grep for something.
$ grep -i "blooey" $(find . -name "*blarg*.cpp")
# Yep, those are the files I'm looking for, so dig in.
# Note the additional -l in grep, and the nested processes.
$ vim $(grep -il "blooey" $(find . -name "*blarg*.cpp"))
|
|
I've always thought it'd be nice if there was a `set` option or something similar that would make bash record command lines and cache output automatically in implicit variables, so that it doesn't re-run the commands. The semantics are definitely different and you wouldn't want this enabled at all times, but for certain kinds of sessions it would be very handy.
EDIT: lazyjones beat me to it.