0

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?

u15p7fgy863eiq5
  • 205
  • 2
  • 5

1 Answers1

0

Here's a lark, to pass e.g. the localhost localhost arguments
to curl as requested:

echo curl --head '"$@"' | sh -s localhost localhost