These work fine:
/bin/dash xyz.sh arg1
curl | /bin/dash -
Use case:
curl | sh - arg1
Ubuntu executes this as:
curl | /bin/dash - arg1
this fails with: sh: 0: Can't open arg1
How do I pass arg1 to curl | /bin/dash
?
These work fine:
/bin/dash xyz.sh arg1
curl | /bin/dash -
Use case:
curl | sh - arg1
Ubuntu executes this as:
curl | /bin/dash - arg1
this fails with: sh: 0: Can't open arg1
How do I pass arg1 to curl | /bin/dash
?
Here's a lark, to pass e.g. the localhost localhost
arguments
to curl
as requested:
echo curl --head '"$@"' | sh -s localhost localhost