tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* capture F4 function key in bourne shell script, while
@ 2004-05-28 21:44 Brehl, Blake
  0 siblings, 0 replies; only message in thread
From: Brehl, Blake @ 2004-05-28 21:44 UTC (permalink / 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
 


 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-28 21:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-28 21:44 capture F4 function key in bourne shell script, while Brehl, Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox