Good resource to couple this resource with: https://linuxjourney.com .
Show HN: I wrote a modern Command Line Handbook
81–90 of 115 posts
Re: Show HN: I wrote a modern Command Line Handbook
#82Re: Show HN: I wrote a modern Command Line Handbook
#83Re: Show HN: I wrote a modern Command Line Handbook
#84Example pages here: https://drive.google.com/file/d/1PkUcLv83Ib6nKYF88n3OBqeeVff...
Re: Show HN: I wrote a modern Command Line Handbook
#85Honestly I would’ve liked to fork over cash for a book like this but the deal breaker for me is that it’s in PDF format. I like to read all of my books on a Kindle (with koreader installed) so epub files that can be resized to fit its weird dimensions are a must.
Re: Show HN: I wrote a modern Command Line Handbook
#86Looks nice! Purchased a copy. :-)
Re: Show HN: I wrote a modern Command Line Handbook
#87Earlier quoted context omitted.
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 ;-)
find ... -exec perl -lne "fancy stuff" {} +
because for one it doesn't mess with stdin, and for another you don't have to worry about filenames with spaces or newlines in them. I also like -execdir since if my script dumps any output to other files I'll probably want that output near the sources. And did I mention it does nothing if there are no matching files? I also think it looks better and is shorter.If you really can't remember that or want to continue to pollute the environment with extra heat generated by running two cpus to do the job one can do, you should at least use -print0/xargs -0 because of spaces, and always use -r to more sensibly handle an empty result-set from find et al (gnu xargs runs once!)
Re: Show HN: I wrote a modern Command Line Handbook
#88#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
#89Re: Show HN: I wrote a modern Command Line Handbook
#90Example pages here: https://drive.google.com/file/d/1PkUcLv83Ib6nKYF88n3OBqeeVff...
Page 12 of the example pdf ends with "On Linux, the PATH looks something like this:", but then there's no PATH example shown.