4 ms·
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/sh/blok.c http://minnie.tuhs.org/cgi-bin/utree
by kps 11y ago
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/sh/blok.c http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/...
- greenyoda 11y agoFor 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.)