Beginner question on using pipes
Hi, I'm trying to write a script that is going to use another program's stdout. For example if I type:
I want myscript.sh to use the string "hello!". I tried to use $1 but it does not work. So I'm confused a little bit. I thought the output of "echo hello!" which clearly is "hello!" should have been redirected to myscript.sh as standard input but it didn't. What am I doing wrong here?
Thanks in advance.