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".)

By the same token, if you prefer to use Linux via a GUI, then do so!

It is your computer, so use however to heck you want.

At least you have that choice.

@neil
I once heard the saying "use Linux with the GUI but control Linux with the CLI" or words to that effect. Forget who said it though.

@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 it's definitely one of those "put in the hard yards to understand and it'll pay you back in miles" utilities.

Or metres and kilometres, in metric.

@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 @greem Oh, I am at least reasonable with awk, just not as good as I'd like to be :)

@neil I kinda expected that, but one person's "fluent" is another person's "barely capable" ... It's hard to judge.

Which is one reason why pair programming (for example) can be daunting, rewarding, and humiliating, all at the same time.

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.

@CppGuy Right, so the first and main reason is that I found AWK before Perl and became *really* comfortable with it very quickly.

Secondly, when Perl came along and I started to look at it, I found it difficult to impossible to convert half my programs, because *lots* of my programs follow the underlying structure of:

/Pattern/ { Action }

Re-creating that structure in Perl seemed ... sub-optimal.

It also seemed sub-optimal to learn two languages that fill very similar paces. In my experience there are few places where Perl is clearly better than AWK.

And I always found problems understanding how Perl thinks about variables, whereas in AWK I can see *exactly* what's going on. Perhaps the tutorials I started with were poor and I was left with a bad impression, but certainly my mental model of "how things work" was broken multiple times as I tried to understand Perl programs, and write my own.

So I never got "off the ground" with Perl.

I don't know it well enough to provide a clear critique of the language itself ... hence this is all just my experience.

CC: @neil @greem

@ColinTheMathmo @neil @greem

Thanks โ€” that's interesting and also completely valid. Different programming languages suit different people. And three of us, in different ways, have now said we found something we liked and didn't really see a reason to change, or encountered friction when we tried to change.

@greem @neil
Own โ€œUnix in a nutshellโ€ book too.
Thanks for the reminder, โ€”need to dig it out.โ€” Found it!

UNIX in a nutshell book cover for 1994 second edition for Unix desktop reference of all the commands.

@neil and you can keep improving shell and terminal proficiency as well since it is such a deep pocket of info, some commands have a lot of switches/flags
@neil
I learned so much from the O'Reilly " Unix Power Tools" book, which had a sort of discussion among the editors at times like "These are the only flags I use for this" vs "oh that's good, but my finger memory is for these switches..."
@neil It was actually that book plus a strange hardcover volume on DEC's OSF/1 that taught me to really Think In Unix.
@neil You could say the same about Windows and powershell...
@foxbasealpha I know so little about Windows these days that I will happily take your word for it!
@neil It's a very powerful and easy to learn scripting language. I've been known to install it in Linux environments as well as Windows...
@foxbasealpha
Yes, compared to bash, zsh etc powershell is so much easier, and seems just more sensible. There is also NuShell that has a similar philosophy, and integrates a bit better on Linux, IMO.
@neil
@stib @neil There's a huge ecosystem of commandlets in powershell - which is *so* useful for sysops. I have a script that evacuates all the vms from a host and shuts it down, which I can trigger from a UPS alert for example.

@neil

My first Linux install in the 90's, I cannot even remember the name, came with an onion paper manual the size of a physics coursebook.

@houba
Ygdrassil, on the CD attached to a printed and bound Linux Bible.

https://archive.org/details/the-linux-bible-3rd-edition

I was there.

@neil

The Linux Bible, 3rd Edition : Yggdrasil Computing Inc : Free Download, Borrow, and Streaming : Internet Archive

ISO image of CD-ROM included with The Linux Bible, 3rd Edition, published in 1995 by Yggdrasil Computing

Internet Archive

@neil FIVE HUNDRED AND NINETY-SIX PAGES!!??

Using the command line at all is a desperate last resort. There will be a one page crib sheet for anything I *have* to do with the command line.

@TimWardCam To each, their own!
@neil Yeah, it would be boring if we were all the same.
@neil this is what I learned from way back in like 2015 when I made the switch, it's great
@neil Did not know this existed. Thanks! It will make a nice companion to my trusty O'Reilly Pocket Guide!

@neil Thanks for the pointer!

Iโ€™ve been using Linux for over 20 years, and Iโ€™ll
be taking a look.

@neil

Thanks @neil.

Very handy to have.

@neil s/free/gratis/
@mirabilos Please don't do that again - it is simply rude.
@neil @mirabilos One might even say it grates?
@neil as is calling something under a non-free licence "free" in FOSS spaces

@neil
I have no stake in this site or any of the books on it, but it's loaded with No Starch books for the next two weeks. Including the 3rd No Starch edition of this 7th internet edition should anyone want an epub.

https://www.humblebundle.com/books/linux-good-stuff-no-starch-books

Humble Tech Book Bundle: Linux, the Good Stuff by No Starch

Unlock new levels of freedom and creativity when you use Linuxโ€”master the ins and outs of Linux today and help support charity!

Humble Bundle