westwood01
Technical User
Below is a portion of a (ksh) case script. The way the menu works now is, via the select statement I can only choose one of the numbered options at a time. Is there a way to choose multiple options?
For example, if I run the script and choose option 3, I will be presented with a list that looks like:
Listing of MARGE Failed Save Sets:
1) Jun 20 14:51:49 marge: atexentsys1:/
2) Jun 20 14:51:49 marge: atexentsys1:/oracle
3) Jun 20 14:51:49 marge: atexentsys1:/ora01
4) Jun 20 14:51:49 marge: atexentsys1:/orasrv
5) Jun 20 14:51:49 marge: atexentsys1:/apps
#?
At this (#?) point I can enter any one of the listed lines. Is there a way I can choose more than one?
Option 3 portion of the case script:
3) clear
grep marge data2.email > data3.marge
echo ""
echo "Listing of MARGE Failed Save Sets:"
echo ""
IFS="
"
select line in $(<data3.marge);do
echo ""
echo "You Selected $REPLY for $line"
echo "Create Ticket y/n?"
read reply1
if [ "$reply1" = "y" ]
then
echo "Processing . . . "
echo "$TODAY $TIME : $line" >> submitted.log
./maketicket;./system.ksh
else
echo "Request Cancelled"
./system.ksh
fi
done
nogo
badreply;;
For example, if I run the script and choose option 3, I will be presented with a list that looks like:
Listing of MARGE Failed Save Sets:
1) Jun 20 14:51:49 marge: atexentsys1:/
2) Jun 20 14:51:49 marge: atexentsys1:/oracle
3) Jun 20 14:51:49 marge: atexentsys1:/ora01
4) Jun 20 14:51:49 marge: atexentsys1:/orasrv
5) Jun 20 14:51:49 marge: atexentsys1:/apps
#?
At this (#?) point I can enter any one of the listed lines. Is there a way I can choose more than one?
Option 3 portion of the case script:
3) clear
grep marge data2.email > data3.marge
echo ""
echo "Listing of MARGE Failed Save Sets:"
echo ""
IFS="
"
select line in $(<data3.marge);do
echo ""
echo "You Selected $REPLY for $line"
echo "Create Ticket y/n?"
read reply1
if [ "$reply1" = "y" ]
then
echo "Processing . . . "
echo "$TODAY $TIME : $line" >> submitted.log
./maketicket;./system.ksh
else
echo "Request Cancelled"
./system.ksh
fi
done
nogo
badreply;;