I created a bash script that will print qmb00l if the sch is 4cn.tbl, and qmb00l45 if the sch is 4cn1.tbl, but when I execute the script, there is no response in terminal. I want to print like this
Sch Name : qmb00l
cd /home/fj/vanessa/Desktop
sch="$(echo -n " Sch Name : "; grep -o '4cn.tbl\|4cn1.tbl' schmaneg.sch)"
if [ "$sch" = 4cn.tbl ]; then
sch = "qmb00l"
echo $sch
fi
if [ "$sch" = 4cn1.tbl ]; then
sch = "qmb00l45"
echo $sch
fi
this is what inside the schmaneg file:
blah
4cn.tbl
bleh
I debugged but nothing happened.