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?

1 Answer 1

0

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

echo curl --head '"$@"' | sh -s localhost localhost
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.