create a function in bash code example
Example 1: bash function
#!/bin/bash
#Call a function without arguments
function quit {
exit
}
#Call a function with arguments
function e {
echo $1 #$1 will be set to the first argument given
}
Example 2: how to make a function in bash
print_something () {
echo Hello I am a function
}
Example 3: how to make a function in bash
function_name () {
<commands>
}