[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: How does a pipe works?
Shridhar Daithankar wrote:
> Hi
>
> When you run the command, it actually waits for reading from standard
> input. But despite of that nothing comes in var, that you type is probably
> because a \n that echo prints. Not sure on this...
Shridhar : That is what I had concluded earlier. But replace the "echo" command with
any
shell script/utility/built in command, you will see that the script gets executed &
there is an infinite wait ( here I presume it is wait for some i/p to read
command). However , when you try to echo the variable to find what it read you get a
blank line (new line?).
Now like 'echo' other commands also i/p a '\n' at the end of there execution. Then
why this unusal behaviour with 'echo' ?
Also if the 'read' operation is done, where the value of this variable is stored?
---rk