I intend to execute this way:
./some_code | ./my_bash.sh
What is the syntax in ./my_bash.sh
so that it can take
input from other as pipe?
I tried this but wont work.
#!/bin/bash
# this is ./my_bash.sh
cut -f1 $@ | grep 'foo' | wc -l
# $@ failed