Piping in Bash (`echo "blah" | foo`)
In bash we can use the pipe character to pass some content to a command;
If I'm the author of the command
As I understand it,
Though running
If I'm the author of the command
foo, how can I access that content. eg "blah"?As I understand it,
"blah" should be the stdin for foo, however when I write the following implementation I get no result;Though running
foo "blah" works as expected. I'm guessing $@ is not the correct symbol to use for this