Hacker News new | ask | show | jobs
by 9fb29947 3931 days ago
My eyes!

https://github.com/c3x04/Unix-1st-Edition-jun72/blob/master/...

1 comments

Have a look at v7 sh(1) and you'll feel better.

e.g. http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/...

For those who don't know C, what Bourne did here was to define some macros that allowed him to get rid of C's curly brackets. E.g.,

    IF ...
    THEN
       ...
    FI
translates to

    if ( ...
    ) {
       ...
    }
I remember last seeing this code around 1980-82 when I was working with 7th Edition Unix and wondering why someone would want to do that, since it would have made the program hard for another C programmer to read and maintain. (If I remember correctly, this programming style is unique to the shell code.)