Pattern: Use of unsupported .
command
Issue: -
In Bash and Ksh, you can use . samplescript arg1 arg2..
to set $1
and $2
in the sourced script.
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.
Example of incorrect code:
#!/bin/sh
. include/samplescript example.com 80
Example of correct code:
#!/bin/sh
host=example.com port=80 . include/samplescript