thekube/options-example.sh

11 lines
205 B
Bash
Raw Normal View History

2023-12-20 16:42:08 +00:00
#!/bin/bash
foo1() { echo 'hello from foo1!'; }
foo2() { ls -l; }
foo3() { echo 'hello from foo3!'; }
# read -p "Enter a Number (1,2, or 3): " num
if [[ $1 = [123] ]]; then # validate input
foo"$1"
fi