From: "Brehl, Blake" <Blake.Brehl@anritsu.com>
Subject: capture F4 function key in bourne shell script, while
Date: Fri, 28 May 2004 14:44:53 -0700 [thread overview]
Message-ID: <B6AB323D7140944E9AD51206F7078F6705571E7A@moh-exc-002.main.intgin.net> (raw)
Hi Admins,
I have the following script which is executed from a ksh clients .profile:
(grep exec .profile = "exec the_below_script")
#!/bin/sh
stty intr '^-'
echo " **************************
echo " * A) Run program A *
echo " * B) Run Program B *
echo " **************************
echo " * 9) Exit
END1=0
while test $END1 = 0
do
END1=1
echo "Please Enter Choice: \c"
read INPUT1
case $INPUT1 in
a|A) /apps/scripts/programA
b|B) /apps/scripts/programB
9|EXIT|exit|E|e|Q|q) END1=1;;
*) END1=0;;
esac
done
stty intr '^c'
exit 0
I would like to add the F4 function key entry to the exit condition:
9|EXIT|exit|E|e|Q|q) END1=1;;
When in the while statement, hitting function key F4 returns to the screen
"^[OS", example:
Please Enter Choice: ^[OS
Is there a way to capture the F4 function key to exit the shell?
Best Regards,
Blake Brehl
Sys Admin/DBA
Anritsu Company United States
Morgan Hill, CA
reply other threads:[~2004-05-28 21:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox