Nguyễn Thị Lan
New member
How do you source in bash?
Answer
The syntax for the source command is as follows:
Answer
The syntax for the source command is as follows:
- source FILENAME [ARGUMENTS] . …
- check_root () { if [[ $EUID -ne 0 ]]; then echo “This script must be run as root” exit 1 fi }
- #!/usr/bin/env bash source functions.sh check_root echo “I am root”
- VAR1=”foo” VAR2=”bar”