I had not noticed that there was a new edition of "The Linux Command Line" until today.

If you use Linux, and perhaps especially if you are new to Linux, and want to get to grips with command line / terminal usage, it is well worth dipping into this free (CC BY-NC-ND) tome:

https://www.linuxcommand.org/tlcl.php

#books #Linux

Linux Command Line Books by William Shotts

Linux Command Line Books by William Shotts

I am not telling anyone else how to Linux, but when I first started using it, I found this kind of thing invaluable.

I had, I think, a smaller book, "Linux Pocket Guide: Essential Commands" and that was so helpful too.

I am sure that one could use Linux without touching a terminal but, for me, the terminal is a fantastic and useful way of computing, and so upskilling in its usage has been time very well spent.

(See also books like "Practical vim" or "tmux in practice".)

@neil I bought a copy of "UNIX In A Nutshell (updated for System V R4!)" in the mid 90s and it's still my go-to reference for all things POSIX.

The spine is broken on the pages for grep, awk, sed, nroff and vi 😁

@greem I wish that I knew awk better than I do, tbh.

@neil (G)AWK is definitely worth the time. Simple use is almost trivial and suddenly there are things that were awkward that are now ready one-liners.

Very easy to fall into the trap of doing overly clever things, but absolutely it's worth the investment.

CC: @greem

@ColinTheMathmo @neil @greem

This is going to sound as if I'm trying to start a language war, but I'm not.

I'm genuinely surprised that people use Awk when Perl is available. I always think of Perl as having superseded Ask. What's the appeal of Awk nowadays? What am I missing? Is it just that Perl has a bad reputation because of all those dollar signs?

@CppGuy Reasonable question, and I will answer when I can sit at a proper machine and compare my thoughts. It will very much be a personal opinion.

But just now I am in a cafe halfway between home and a visit to a family member, so have not the time.

But will reply.

CC: @neil @greem

@ColinTheMathmo

Personally it's all down to preference. I've been using grep/sed/awk for so many years that even writing "perl -le '_script stuff here_" feels like overkill.

I regularly still write in Perl, bash and nowadays Powershell (mainly for interoperability with Windows and M365 stuff), but sometimes being able to let my brain freewheel and use the older tools achieves the same end.

TMTOWTDI, after all!

@CppGuy @neil

@greem @ColinTheMathmo @neil

Ah, now grep I do use, umpteen times a day. For cases where its regex support is capable enough (which is nearly all of them), it's much more convenient, and probably faster, than a Perl say if /.../ one-liner.

Perl was available to me (in the mid-90s, on Windows, as BigPerl 4.0.36) before sed and awk were, or at least before I found them, and I guess that's why I never learned them even after moving from Windows to Linux.