Is there a way to include another shell script in a shell script to be able to access its functions?
Like how in PHP you can use the include directive with
include
Syntax is source
source
ex. source config.sh
source config.sh
script - config.sh
USERNAME="satish" EMAIL="satish@linuxconcept.com"
calling script -
#!/bin/bash source config.sh echo Welcome ${USERNAME}! echo Your email is ${EMAIL}.
You can learn to include a bash script in another bash script here.