Earlier quoted context omitted.
Thanks for the input. I have made several updates to the book in the past and this would be lost in print, but as the book matures and I incorporate feedback it can be interesting to try offering a print version. Perhaps print-on-demand type of thing.
Amazon does print on demand. I have a book published there that I sell at cost and it’s about $8 shipped. Print quality is pretty good. If you make changes, you just upload a new template and you’re all set.
Show HN: I wrote a modern Command Line Handbook
101–110 of 115 posts
Re: Show HN: I wrote a modern Command Line Handbook
#102Example pages here: https://drive.google.com/file/d/1PkUcLv83Ib6nKYF88n3OBqeeVff...
Re: Show HN: I wrote a modern Command Line Handbook
#103Cool, 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...
> if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
> ... is an option that starts with one or multiple - characters ...
"one or multiple" is + not *. The regex above will also match "h" and "help" without - character(s).
Re: Show HN: I wrote a modern Command Line Handbook
#104I need to train some people (who will never use the command line and will go back to excel and VSCode, but I am not the genius who decides what people have to be competent in…) and this book is great, but I don’t think they are motivated enough to learn without some projects or problems and I struggle to invent nonsense projects.
Re: Show HN: I wrote a modern Command Line Handbook
#105Re: Show HN: I wrote a modern Command Line Handbook
#106Re: Show HN: I wrote a modern Command Line Handbook
#107#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.
Is there an explanation why? (Average line count in my scripts is 115).
No package manager, build, or dependency features. This means it is ugly and gross to import functions from other programming languages.
Zero data structure support, so any data manipulation is horrible.
No test support, so you can't mock and test business logic.
No debugger support.
It's just a bad, cryptic, confusing language that is hard to maintain.
Remember: it's not that you CAN'T do these things, it's that they work better in other languages, like Node or Python. And shelling out in Python or node works great and is very easy. And Python comes built into most systems these days.
It is hard to justify writing shell scrips anymore. It's like writing perl or cobol. We have better tools now, the world has moved on.
Re: Show HN: I wrote a modern Command Line Handbook
#108Re: Show HN: I wrote a modern Command Line Handbook
#109Wow. This is amazing. I really like the way you use color and do footnote-like explanations.