Live data from Hacker News

Show HN: I wrote a modern Command Line Handbook

commandline.stribny.name

61–70 of 115 posts

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

#61

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.

Thanks.

You teach this in a classroom?

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

#62
post #54

Earlier quoted context omitted.

One of my favorites from the book is to alias "xdg-open" to "open" because I never remember the command. So now I can just type "open X" to open a file system location or file in a normal GUI program when needed. It is a small thing but I use it a lot. Something that I didn't put in the book because I learned it only recently is the use of "notify-send", aka you can send yourself a system notification from the comman…

In my Linux install (Debian 12/Bookworm) /usr/bin/open is a symlink to /usr/bin/xdg-open so I was always using xdg-open without even knowing it.

Great somebody thought of it!

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

#63
post #8

Cool book! Humble suggestion: Give more specific examples of what the reader will learn on the landing page. From the landing page, I don't know if this is for total command line beginners or has helpful tips for people familiar with bash already. I had to hunt around to find sample pages, and they provided much better sense of what's in the book. Also, spotted some small issues in the copy: "Fresh out of press" - Th…

True, the landing page could be more detailed. I didn't want to repeat much the info on Gumroad page, but maybe I should rethink it. And thanks for the copy suggestions. I am not a native speaker :)

I definitely think you should add more info to the landing page - I had no idea there was further information on the Gumroad page.

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

#64
#1 thing in command line shell scripting should be: "Do not use it for advanced scripts. If you have multiple if statements and for loops, rewrite it in a higher level language."

This is also the advice given in the google shell guide.

I say this after years of being a DevOps and Platform engineer. Bash is trash. It is great for 10-20 line scripts. Beyond that, it is worthless.

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

#65

Earlier quoted context omitted.

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!

Thanks for the clarification. I will see if I can sneak in a note about this in the next update :)

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

#66

#1 thing in command line shell scripting should be: "Do not use it for advanced scripts. If you have multiple if statements and for loops, rewrite it in a higher level language." This is also the advice given in the google shell guide. I say this after years of being a DevOps and Platform engineer. Bash is trash. It is great for 10-20 line scripts. Beyond that, it is worthless.

I would not say it is trash, but I tend to agree with the general sentiment and personally don't write longer scripts.

> This is also the advice given in the google shell guide.

This advice is also given in this handbook :) But in reality you might come to a work repo that already has such scripts and it is good to understand it a little bit, I would think.

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

#67

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!

These might seem basic but they made a huge difference when I learnt them:

  set -o vi
  set -o xtrace
  xargs, xargs -I
  parameter expansion (see the Parameter Expansion section in the bash manual)
  ctrl + r
  find -exec
  lsof

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

#68
post #8

Cool book! Humble suggestion: Give more specific examples of what the reader will learn on the landing page. From the landing page, I don't know if this is for total command line beginners or has helpful tips for people familiar with bash already. I had to hunt around to find sample pages, and they provided much better sense of what's in the book. Also, spotted some small issues in the copy: "Fresh out of press" - Th…

True, the landing page could be more detailed. I didn't want to repeat much the info on Gumroad page, but maybe I should rethink it. And thanks for the copy suggestions. I am not a native speaker :)

I’m excited about this book and appreciate your work!

One thing that was distracting was the large title font when I tried to view this site in portrait mode on mobile, as some of the letters are cut off. If that could be fixed, it would help ensure people stay engaged and read it.

You could also potentially use an LLM or something like Grammarly to help proofread it (not edit it).

This is very cool!

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

#69

#1 thing in command line shell scripting should be: "Do not use it for advanced scripts. If you have multiple if statements and for loops, rewrite it in a higher level language." This is also the advice given in the google shell guide. I say this after years of being a DevOps and Platform engineer. Bash is trash. It is great for 10-20 line scripts. Beyond that, it is worthless.

I would not say it is trash, but I tend to agree with the general sentiment and personally don't write longer scripts. > This is also the advice given in the google shell guide. This advice is also given in this handbook :) But in reality you might come to a work repo that already has such scripts and it is good to understand it a little bit, I would think.

"I might come to work on..."

Friend, you have no idea LOL

My hatred is well earned!

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

#70

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!

grep, sed, awk and regular expressions would probably be part of my 1st hour course if I were to produce one. And by awk I mean the super basic stuff like -F',' '{print $3" "$NF}' is already a long way

also any command | while read line; do something $line; done

and find and vi of course

Post reply on HN