Article Listing 1 Listing 2 aug2006.tar

Listing 2 my_ontape.ss

# Listing 2:
# my_ontape.ss 
# test script to see if the user pressed return
# in the my_arhive program
#!/bin/ksh

string=$(/usr/proc/bin/pstack 2>&- $(pgrep -f "^/tmp/my_ontape") \
| head -2 | tail -1 | cut -d' ' -f3,8,10)
if [[ $string = "read (0, 400)" ]]
then
   echo "my_ontape:  user still needs to 'Press return to continue'"
   exit 1
else
   exit 0 # user pressed return
fi