Skip to content

Files

Latest commit

 

History

History
27 lines (17 loc) · 471 Bytes

SC3046.md

File metadata and controls

27 lines (17 loc) · 471 Bytes

Pattern: Use of source for dash/sh

Issue: -

Description

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

Further Reading