Bash functions
# Define a function function example { echo $1 $2 } # Call it example "Hello!" "World!" # Capture stdoutput variable=$(example "Hello!" "Variable!") # Check return value echo $?