We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#!/bin/sh . include/myscript example.com 80
#!/bin/sh host=example.com port=80 . include/myscript
In Bash and Ksh, you can use . myscript arg1 arg2.. to set $1 and $2 in the sourced script.
. myscript arg1 arg2..
$1
$2
This is not the case in Dash, where any additional arguments are ignored, or in POSIX sh where the behavior is unspecified.
Instead, assign arguments to variables and rewrite the sourced script to read from them.
None.