linux use sh execute source error [How to Solve]

Error: In the shell script, execute the file with sh and report source: not found

Reason: sh and bash are different shells, there is no source command in sh. So when running with sh or ./, this error will be prompted.

Solution: replace sh with bash, eg. bash test.sh
is to use bash to execute it.

Read More: