πŸ’Ύ Archived View for gmi.noulin.net β€Ί unixKoans β€Ί shell-tools.gmi captured on 2024-08-25 at 05:03:04. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Master Foo and the Shell Tools

Prev

Next

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Master Foo and the Shell Tools

A Unix novice came to Master Foo and said: β€œI am confused. Is it not the Unix way that every program should concentrate on one thing and do it well?”

Master Foo nodded.

The novice continued: β€œIsn't it also the Unix way that the wheel should not be reinvented?”

Master Foo nodded again.

β€œWhy, then, are there several tools with similar capabilities in text processing: sed, awk and Perl? With which one can I best practice the Unix way? ”

Master Foo asked the novice: β€œIf you have a text file, what tool would you use to produce a copy with a few words in it replaced by strings of your choosing?”

The novice frowned and said: β€œPerl's regexps would be excessive for so simple a task. I do not know awk, and I have been writing sed scripts in the last few weeks. As I have some experience with sed, at the moment I would prefer it. But if the job only needed to be done once rather than repeatedly, a text editor would suffice.”

Master Foo nodded and replied: β€œWhen you are hungry, eat; when you are thirsty, drink; when you are tired, sleep.”

Upon hearing this, the novice was enlightened.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Master Foo and the Old HandΒ  Β Master Foo and the Nervous Novice

Prev

Home

Next