what does | bash -s do? any example?
I am trying to understand what | bash -s does
$ echo ls| bash -s sdfdsf <--- seems to be same as $echo ls |bash . What is the -s asdf doing? |
Te "-s" tells bash to read a command from stdin even though more arguments follow. The "sdfsdf" will be a positional argument to bash, but the command you are passing does not make use of it. Try this:
Code:
echo 'ls $*' | bash -s sdfsdf |
All times are GMT -5. The time now is 03:31 AM. |