
Using sed to make indexes for books (1997) - kawera
http://www.pement.org/sed/bookindx.txt
======
d33
Is there any non-artistic reason why one would like to do it this way instead
of using any programming language that's actually any readable?

~~~
jrochkind1
I guess because it's 1997 and your free readable programming languages for
convenient text processing were limited to... uh... does Perl count as
readable?

~~~
gbacon
Yes. CPAN is full of readable Perl. Spare us the unfair generalization.

~~~
jgtrosh
To be fair with the previous comment, do you claim CPAN was full of readable
Perl, _back in 1997_?

------
Ice_cream_suit
sed and it's bigger brother awk, are excellent tools to have in your daily use
toolkit.

O'Reilly have an excellent book: "sed & awk Book by Arnold Robbins and Dale
Dougherty"

For awk, there is the classic book:"The AWK Programming Language by Alfred V.
Aho,‎ Brian W. Kernighan,‎ Peter J. Weinberger"

~~~
reacweb
There are a collection of use cases where sed and awk (and bash) are perfect
tools. IMHO, the best advice is to switch to a real scripting language (like
perl or python) as soon as the complexity increases. This way you never need
to learn in detail all the intricacies of these tools. You just need to know
the small use cases and to master your favorite scripting language. The life
is too short and too many interesting domains exists to lose time mastering
the quirks or sed, awk and bash. Real scripting languages do not have so many
quirks and limitations. This helps to produce less buggy software. Time is
precious, choose what you want to learn.

------
saagarjha
I believe _The Unix Programming Environment_ used this technique to create
their index.

~~~
dredmorbius
A few of the early O'Reilly books.

 _UNIX Power Tools_ may or may not be one of them, but _remains_ a phenomenal
book. It's what got me "over the hump" in grokking Unix and how it and its
tools worked, many, many moons ago.

Larry Peek is a God.

------
JdeBP
Unix also came with dedicated to the purpose tools for making indexes. ptx is
one.

