using exit codes
Andrew P. Lentvorski, Jr.
bsder at allcaps.org
Tue Mar 9 03:07:18 PST 2004
On Mon, 8 Mar 2004, David Lowenstein wrote:
> I have inherited some scripts written in csh that just work. If I want to
> modify them I have to know how to do csh scripting, and it's a lot easier
> to make small modifications to a script than it is to go through and turn
> every endif into a fi, every $status into $?, every foreach into a for so
> that it's now written in the "superior" bourne shell.
That's a different problem from actually choosing the language from the
start. For example, I almost always write Python scripts instead of Perl
scripts, but I rarely completely rewrite functioning Perl scripts from
scratch. I'll normally make the change in Perl instead.
> Knowing that $status shows the return status of a command is useful
> knowledge if you have a user account on a system where csh is the "nicest"
> shell that it has (like the hp-ux 10.2 systems I worked on at PG&E).
Really? I though ph-ux had ksh as a native shell somewhere.
-a
More information about the KPLUG-List
mailing list