I define two functions in a bash script say.sh
. I would like ./say.sh hello
calls hello(), and ./say.sh hi
calls hi(). What is the bash-y way to do it?
#!/bin/bash
hello(){
echo "hello"
}
hi(){
echo "hi"
}
I define two functions in a bash script say.sh
. I would like ./say.sh hello
calls hello(), and ./say.sh hi
calls hi(). What is the bash-y way to do it?
#!/bin/bash
hello(){
echo "hello"
}
hi(){
echo "hi"
}