2022-10-23

I've been using unix/linux in some form or another for over 2
decades now, both at my day job for work and also as my primary OS
across a number of system and years. However, even with all that
experience, I will never claim to be a unix guru or expert. One of
the reasons why is because frankly I never really bothered to learn
the unix shell much at all.

One of the central tenets of Unix is for the user to aggregate a
bunch of small single-purpose utilities and then pipe them to each
other to do big jobs. That is the Unix way(tm)...or so the story
goes.

However, my own personal experience actually differed from this
quite a bit for one big reason: Perl.

I learned to program perl at the same time as I really learned to
move around and live with unix on a day-to-day basis. Perl is kind
of like the antithesis of the unix philosophy. You can do anything
and everything in perl in a million different ways. It literally
is everything and the kitchen sink and since it was birthed on
unix, it is well suited for a lot of those tasks.

I'm a diehard perl fanboy which to be honest kind of dates me and
makes me feel old. But the side effect of all my years using perl
is that I just never developed the skills needed for bash scripting
or even bothered learning most of the famous and classic unix tools
nor how they pipe together to do cool things.

Any script that was more complex than 1 pipe, I would just bang
out a quick perl script to do what I needed it to do. all text file
munging or manipulation that I needed to do...just send it to perl.

Any automation scripts I needed to do I would just write a perl
script with system calls galore. I'm not saying my use of perl as
a replacement for piping and bash scripting is the superior method,
but it did do everything I've ever needed it to do.

It's only been in the past few years that I've actually tried to
sit down and learn some of the actual unix tools and to do things
unix way. In my experience, I would say that using unix commands
and piping is probably the faster way to do things on the shell
with the major exception being anything requiring a for loop or
conditionals.

i've never found bash for loops or conditionals to be very intuitive
at all. It always takes me a couple of tries to get it right and
to be honest, it'd be faster for me to just write a perl script
and make the system calls in a perl loop. Plus i'd gain regular
expressions and hashes and all sorts of cool stuff.

But learning is a lifelong exercise so I'm trying to use more unix
utilities in my day to day life. For example, i'm using the fmt
command to format all of my gopher phlogs. eh, it's a start.

*edit:

for those kind folks that sent me email replies on some of my phlog
posts, I've finally gotten my pine spam filters corrected.
I had a spam filter that was set to flag messages with an exclamation
point (of all things!) and send it to some non-obvious folder (sorry f6k!).
I don't know if that was a brain fart or what but it certainly
was a dumb spam filter. Also note to self, use better spam filter
names since "spam1", "spam2", "spam3", and "spammy" are some of the
worst and least descriptive spam filter names EVER.