shell script problem
Hi All -
I have a shell script (/usr/bin/sh) in which is use mount -p | grep ... | awk ...| wc -l
What happens is I see mount -p executed first and then awk and then wc and last grep. Basically it does not execute in the order it was given.
Any ideas or pointers...
TIA
Regards
[315 byte] By [
ledzepa] at [2007-11-26 22:42:26]

# 1
> Hi All -
>
> I have a shell script (/usr/bin/sh) in which is use
> mount -p | grep ... | awk ...| wc -l
> What happens is I see mount -p executed first and
> then awk and then wc and last grep. Basically it does
> not execute in the order it was given.
How are you viewing the execution order?
Any of the programs on the line can be started in any order, but the 'grep' will be the first of them to receive the data.
Under most circumstances you don't care about the execution order, just that the data flows through them properly. How is this causing a problem for you? Can you provide more details?
--
Darren