Hi,
The 'if' statement works fine in selecting a number from 0 to 68.
What I cannot fathom is how to give the option of getting a suffixed
number eg. 56c to work.I've searched high and low.
I should be most grateful for a solution .
Code:
echo
read -p "Choose a number,space then Enter >: " no word
echo
if [[ $no -le 68 ]];then
grep -irw --colour=auto "$word" ${bib[$no]}
echo
cwd="$(grep -oiw "$word" ${bib[$no]} |wc -l)"
echo "$cwd word/s as entered"
elif [[ $no -le 68 +[a-z] ]];then
echo
grep -rw --colour=auto "$word"${bib[$no]}
dwd="$(grep -ow "$word" ${bib[$no]} |wc -l)"
# echo "$dwd word/s as entered "
fi