c-shell script - capturing exit codes.
807559Jun 29 2004 — edited Jun 29 2004
Hi,
I have a c-shell script which runs our support desk through daily admin tasks.
One of these utilises useradd to help the support desk create users.
My problem is that if the useradd fails for any reason, the script still goes on to set passwords etc.
Useradd states: In case of an error, useradd prints an error message and exits with a non-zero status.
Which is great.. So my question is;
"How can I capture the exit code so that I can filter out what I want to do next?"