I've written a few useful scripts that everyone should have. histogram - simply counts each occurrence of a line and then outputs from highest to lowest. I've implemented this program in several different languages for learning purposes. There are practical tricks that one can apply, such as hashing any line longer than the hash itself. unique - like uniq but doesn't need to have sorted input! again, one can simply h…
The most surprising Unix programs
161–170 of 182 posts
Re: The most surprising Unix programs
#162Re: The most surprising Unix programs
#163all are so exciting!!
Re: The most surprising Unix programs
#164sl ``` ( ) (@@) ( ) (@) () @@ O @ O @ O (@@@) ( ) (@@@@) ( ) ==== ________ ___________ _D _| |_______/ \__I_I_____===__|_________| |(_)--- | H\________/ | | =|___ ___| _________________ / | | H | | | | ||_| |_|| _| \_____A | | | H |__--------------------| [___] | =| | | ________|___H__/__|_____/[][]~\_______| | -| | |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-O=====O=====O=…
During college my friend and I kept an innocent prank going for a couple of years: every time one of us left our laptops unlocked the other would jump in and type 'alias ls=sl' in the prompt and then clear the screen. Good times.
Re: The most surprising Unix programs
#165It's surprising that Doug McIlroy still reads and writes about UNIX. For those who don't know, Dough is the guy that invented pipes.
Also interesting: > Originators of nearly half the list--pascal, struct, parts, eqn--were women, well beyond women's demographic share of computer science.
Re: The most surprising Unix programs
#166Re: The most surprising Unix programs
#167Re: The most surprising Unix programs
#168sl ``` ( ) (@@) ( ) (@) () @@ O @ O @ O (@@@) ( ) (@@@@) ( ) ==== ________ ___________ _D _| |_______/ \__I_I_____===__|_________| |(_)--- | H\________/ | | =|___ ___| _________________ / | | H | | | | ||_| |_|| _| \_____A | | | H |__--------------------| [___] | =| | | ________|___H__/__|_____/[][]~\_______| | -| | |/ | |-----------I_____I [][] [] D |=======|____|________________________|_ __/ =| o |=-O=====O=====O=…
$ cowsay "hey dude"
__________
----------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||Re: The most surprising Unix programs
#169What's surprising about eqn, dc, and egrep? I'm using the latter two all the time, and have used eqn (+troff/groff and even tbl and pic) in the 1990's for manuals and as late as (early) 2000's to typeset math-heavy course material. Not nearly as feature-rich as TeX/LaTeX, but much more approachable for casual math, with DSLs for typesetting equations, tables, and diagrams/graphs. I was delighted to see that GNU had a…
It was amazing that you could write pretty complex math with just a few special literals like “sup” and “sum”, and the braces. It turns out that compositionality is so strong in math that it’s most of what you need. This isn’t obvious until you try it!
Paired with a LaserWriter (vintage 1986, say), and troff, you could get almost book quality typesetting.
Later on, TeX got the details of math much better, but the basic language was the same.
Re: The most surprising Unix programs
#170Earlier quoted context omitted.
The related join(1) and comm(1) are oft-missed and occasionally helpful.
I'm going through the AWK book and join is in there. I was unhappily surprised to find that using a tab as a delimiter is painful with join. Variations to overcome this which I've bumped into: join -t $'\t' file1 file2 (BASH only, I think.) join -t ' ' file1 file2 join -t "`echo '\t'`" file1 file2 Why 'join -t '\t' file1 file2' is apparently beyond the pale has me mystified.