I have a script which starts out with:
ls -lhagG | grep ^d
ls -lhagG | grep ^-
but I would like to be able to do something like this:
ls -lhagG ls's output to grep ^d and then ls's output to grep ^-
so I don't have to run ls twice. I can't find a howto I can understand. I think what I need to use is named pipes but I'm not sure.
ls -lhagG | grep ^d
ls -lhagG | grep ^-
but I would like to be able to do something like this:
ls -lhagG ls's output to grep ^d and then ls's output to grep ^-
so I don't have to run ls twice. I can't find a howto I can understand. I think what I need to use is named pipes but I'm not sure.
Comment