Live data from Hacker News

Show HN: I wrote a modern Command Line Handbook

commandline.stribny.name

31–40 of 115 posts

Re: Show HN: I wrote a modern Command Line Handbook

#31
post #30

Is your focus on older tools that tend to be on most machines and used in older shell scripts (e.g., find and grep), or on newer and upgraded tools (fd, fzf, rg) that developers install on their own machines, or both?

The older standard tools, because they can be easily put in CI pipelines and shared as scripts with coworkers.

For example, in my personal and professional life I use Make everywhere. The book mentions alternatives, but the examples are built on the time-tested tools.

I focused on things that don't require install (if given the option) or the ones that you are more likely to encounter at work. It is a tradeoff and I can see how the reverse would be appealing too.

Re: Show HN: I wrote a modern Command Line Handbook

#32
Looks very nice!

I have an interactive tutorial I wrote and teach with which is here: https://github.com/JulianEducation/CommandLineBasics in case it's useful as well. I only have 90 minutes in my case so it's a constant battle to tweak what I can get to with my audience, so there's still lots of things I want to change.

But I think it's very important to have lots of resources here so I'm excited to look at yours.

Re: Show HN: I wrote a modern Command Line Handbook

#33
post #29

Example pages here: https://drive.google.com/file/d/1PkUcLv83Ib6nKYF88n3OBqeeVff...

Hmm, the example page doesn't convince me, for example > The diff utility can compare files and print their differences. If we pass it the result of ls commands, we can compare the contents of directories. No, if you pass the output of ls commands, you might get an error because you'll pass a bunch of files to diff. And last but not least there's diff -r directory-a directory-b to compare two directories file by file…

I wanted to demonstrate the use of the substitution, not the best way to diff directories. Often I tried to create examples that demonstrate multiple concepts or tools at once to save space. But I see your point.

Re: Show HN: I wrote a modern Command Line Handbook

#34

Cool, couple of comments. The website it a bit broken on mobile (at least for me) since text goes off the screen. Second, it would be good to have some sample pages or at least a page of contents so people can see the level of detail the book is aimed at. I know I could just get the book for free and then pay later but that kind of a faff and I feel bad choosing $0 for these kinds of things.

Thanks for the feedback. I was trying to make it work on mobile but maybe I didn't test it well in the end. As for a sample, I will go and try to make something now. Thanks. Edit: Example pages here: https://drive.google.com/file/d/1PkUcLv83Ib6nKYF88n3OBqeeVff...

One nit: ^D only exits if the cursor is at the beginning of a line. Enter ^D and the session remains.

Otherwise, looks good! Use of "env" and proper quoting are strong signals!

Re: Show HN: I wrote a modern Command Line Handbook

#35

This is excellent! Thank you for posting and best wishes for your success with this! I'm teaching a class next year that'll have college-level students learning to use the command line and this looks perfect. Nowadays most 'learn the shell' resources online seem to focus on how to write scripts, without explaining how to use it interactively. Given this will be (for many) their first experience with a command line st…

Thank you for the nice words :)

Re: Show HN: I wrote a modern Command Line Handbook

#36

It makes me wonder – what's that one command or concept you CLI vets wish you'd learned way earlier that totally changed your game, something that might be in that 'next 20%'? Curious about those 'aha!' moments!

Get really comfortable with find and grep. They’re incredibly powerful. perl -pe is way easier than awk.

I'll second that. And would like to add that find plus xargs is important to know, as it often works much better than the clumsy "exec in find itself.

Oh, and thus of course

    find ... | xargs perl -lne "fancy stuff"
to do some fancy stuff with found files ;-)

Re: Show HN: I wrote a modern Command Line Handbook

#38
post #30

Is your focus on older tools that tend to be on most machines and used in older shell scripts (e.g., find and grep), or on newer and upgraded tools (fd, fzf, rg) that developers install on their own machines, or both?

The older standard tools, because they can be easily put in CI pipelines and shared as scripts with coworkers. For example, in my personal and professional life I use Make everywhere. The book mentions alternatives, but the examples are built on the time-tested tools. I focused on things that don't require install (if given the option) or the ones that you are more likely to encounter at work. It is a tradeoff and I…

<3 GNU Make

Re: Show HN: I wrote a modern Command Line Handbook

#40

Example pages here: https://drive.google.com/file/d/1PkUcLv83Ib6nKYF88n3OBqeeVff...

I consider myself reasonably proficient in the shell, but I learned something just from your sample pages (process substitution). Purchased!

If you have not skimmed through the manual of bash¹ enough to learn about process substitutions, what makes you think you would read a book?

1. https://www.gnu.org/software/bash/manual/bash.html>

Post reply on HN