Linux - Move script functions to another file
Published: Linux Estimated reading time: ~1 minutes
Move functions from your main script into another file
# main.sh
source ./myFuncs.sh
f1 hello world
# myFuncs.sh
function f1 {
arg1 = $1
arg2 = $2
# Do something with ${arg1}
}