I know this isn't Perl related, but I am quite stumped. I am trying to edit the .profile of a user so that all they can run is a single program at login, and if they try to use Ctrl-C or Ctrl-Z to exit, the system would ignore it, and when they do exit the program properly, they would be logged off the system. Right now, if they log off properly, they get a command prompt (they also get a prompt if they do a Ctrl-C or Ctrl-Z).
if [ "$TERM"="" ]then
eval `tset -s -Q -m':?hp'`
else
eval `tset -s -Q`
fi
stty erase "^H" kill "^U" intr"^C" eof "^D"
stty hupcl ixon ixoff
tabs
PATH=$PATH:.
set -u
trap "echo 'logout'" 0
set -o ignoreeof
EDITOR=vi
export EDITOR
## Here are the lines that I am adding.
cd /home/production/scripts
USER=`who am i|cut -c 1..8`
(trap "trap 0;exit" 0 1 3 15; cobrun /home/production/cobol/obj/eftchg
+ $USER)
The system in question is an HP-UX mainframe system, and the user's shell is ksh by default. If there are any monks out there who have a good understanding of shell scripting, any help or ideas would be greatly appreciated. Thank you.
RedDog