I am passing the variable akms to the function named sufx. I am able te correctly capture the second array element and set the variable fskl.
I want the capability of setting the variable verbiage according to the numeric value of -v. How can I do this for the function sufx ? Currently verbiage is just taking a string value.
akms=("-v 3" "INCLUDE")
sufx akms
Here is the function
sufx ()
{
typeset -n _akms="$1"
Capture INCLUDE or EXCLUDE option for grep
local fskl="" verbiage=0
for s in "${_akms[@]}"; do
case $s in
("XCL"|"INCL"|"INCLUDE") fskl="INCLUDE" ;;
("NCL"|"EXCL"|"EXCLUDE") fskl="EXCLUDE" ;;
() verbiage=${s#-v} ;;
esac
done
}