Skip to content

korn shell programming advice from David Korn

June 8, 2007

There has been some great stuff about shell scripts on the shell-discuss OpenSolaris list I’m lurking on (my cron changes were discussed there so I got added and have not removed myself).

Starting with the this previously internal advice. I particularly like the c-shell advice, even if the words “for any scripts” seem to be superfluous.

Then last night David Korn posted some advice for shell scripts.

I did not even know you could do

$ > foo date

Now I do and also know it is to be avoided.

Advertisements

From → Solaris

One Comment
  1. sang-suan gam permalink

    Hi Chris,
    it’s sam (gam πŸ™‚ just saw this entry, agree with
    the c shell comment πŸ™‚ there’s an article about why “csh programming considered harmful”.
    google found it for me:
    http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
    should be interesting reading .. especially the
    constructs for closing/opening file descriptors
    in [k]sh … although tcl would have been nicer
    πŸ™‚
    cheers!
    sam

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: