Pattern: Use of source
for dash
/sh
Issue: -
source
is a bash and ksh specific alias for the harder-to-pronounce/search command .
("dot")
When writing for dash
or sh
, use .
instead.
Example of incorrect code:
#!/bin/sh
source mylib.sh
Example of correct code:
#!/bin/sh
. mylib.sh