Hacker News new | past | comments | ask | show | jobs | submit login

Bash also would have been an unlikely choice for a book published in 1988, considering it wasn't released until 1989 (Per Wikipedia).



It would have been ksh, which was the bash of the day, as in, the more featureful sh-compatible sh-superset.

But a bash or ksh script would have been less readable than awk.

bash (or ksh88 or ksh93) is powrful and useful but not readable if you're actually using the powerful useful features.

In bash, a lot of functionality comes in the form of brace expansions and word splitting, basically abusing the command parser to get results there is no actual function for. In awk and any other more normal programming language, those same features come in the form of an explicit function to do that thing.


>In bash, a lot of functionality comes in the form of brace expansions and word splitting, basically abusing the command parser to get results there is no actual function for. In awk and any other more normal programming language, those same features come in the form of an explicit function to do that thing.

Right. That's one of the reasons why the man page for bash is so long. IIRC, going way back, even the page for plain sh was long, for the same reason.


Indeed. But at least it acknowledges it, with the iconic "It's too big and too slow."


Interesting, didn't know. Been a while since I read the page.


> It would have been ksh

No, it wouldn’t have been ksh or any other shell, nor C or Perl, nor anything else but awk, in a book titled “The AWK Programming Language”.


Someone didn't read the thread (or lost the plot), but that didn't stop them from making a non-sensical remark about it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: