Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.
Originally posted by: Bernimac
I have a ksh shell script which runs executes a unidata command.
I want to write into the script that if it is interrupted in anyway it exits out without running the unidata command.
Originally posted by: DaveMarquardt
So what do you want to do while the unidata command is running? Anyway, look into the shell trap command. Maybe something like
trap "exit" INTR
at the top of your script might work.
Thanks.
Originally posted by: PontiacGeronimo
vary usefull can also be set -u and set -e for preventing unexpected behaviour in case of some crucial part of code fails or not expected empty variables