korn shell programming advice from David Korn

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.

Comments:

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

Posted by sang-suan gam on July 04, 2007 at 03:01 AM BST #

Post a Comment:
Comments are closed for this entry.
About

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today