Advanced Bash-Scripting GuideMendel Cooper
Advanced Bash-Scripting Guide
by Mendel Cooper · first published 2014
33mentions
16recommended by
30HN commenters
2011–2026first – last mentioned
53% recommend27% neutral20% critical
Why HN recommends it
Free, book-length bash tutorial that assumes no prior scripting knowledge and works up to advanced topics; handy as a reference for looking up syntax and also useful for daily interactive shell work.
Common criticism: Some experts say it teaches buggy habits and bad practices
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.





…for small tasks, if I come across any problem. Just in case, does anyone know a place(website,book etc.) where such small task scripts are collated so that anyone can use them like small assignments? Advanced Bash Scripting Guide by Mendel Cooper(http://tldp.org/LDP/abs/html/) has some good scripts which I have come across for some practice but it isn't ordered. Any others ?
on “How I Learned to Program” ↗I would like to add the Advanced Bash-Scripting Guide (http://tldp.org/LDP/abs/html/) as an incredible resource. It's obviously geared towards scripting but most of what it teaches is extremely useful for working in an interactive shell as well. I had been…
on “Miguel de Icaza: Learning Unix” ↗If you read, execute and understand all the code in "The Advanced Bash Scripting Guide", you will suddenly find yourself in the top 10% of people who use bash. https://www.tldp.org/LDP/abs/html/ (as a pdf: http://tldp.org/LDP/abs/abs-guide.pdf )
on “The Art of Command Line (2015)” ↗http://www.tldp.org/LDP/abs/html/ TLDP's Advanced Bash-Scripting Guide is a great resource for learning bash. For example, this section talks about the meaning of "$*": http://www.tldp.org/LDP/abs/html/internalvariables.html#ARGL...
on “What I learned from others' shell scripts” ↗There used to be this great resource called Linux Documentation Project. It's not as active as it used to be but it produced some really book-quality documents, including the Advanced Bash Scripting Guide at https://www.tldp.org/LDP/abs/html/ . Read it! It's great. But know that a lot of bash scripting isn't really in bash, it's really required to be proficient with grep, sed, cut, dc and a few other…
on “Bash 5.0 released” ↗Instead of some proprietary book, I would suggest people read the classic Advanced Bash-Scripting Guide: http://tldp.org/guides.html#abs Beginners might prefer the Bash Guide for Beginners: http://tldp.org/guides.html#bbg The Bash manual page is concise because it is a Unix manual page. Unix manual…
on “Surprising Bash Variables” ↗Advanced Bash-Scripting Guide, working link: https://www.tldp.org/LDP/abs/html/ (Your link, without “www”, gives me a certificate error.)
on “Bash $* and $@ (2017)” ↗I’d recommend the Advanced Bash Scripting Guide https://tldp.org/LDP/abs/html/ and make peace with the fact that you’ll never know it all and enjoy the journey. Years later you’ll still be stumbling across new stuff.
on “Ask HN: How do I become a shell god?” ↗The Advanced Bash-Scripting Guide also has some (IMO) good advice, with a footnoted mention of sysexits.h: https://tldp.org/LDP/abs/html/exitcodes.html > The author of this document proposes restricting user-defined exit codes to the…
on “Sysexits – preferable exit codes for programs” ↗…https://www.amazon.com/Linux-Command-Shell-Scripting-Bible/d... UNIX Shell Programming: https://www.amazon.com/Unix-Shell-Programming-Stephen-Kochan... BASH Hackers Wiki: https://wiki.bash-hackers.org/ TLDP Advanced BASH Scripting Guide: https://tldp.org/LDP/abs/html/ The Debian Administrator's Handbook: https://debian-handbook.info/browse/stable/ TLDP Linux System Administrator's Guide: https://tldp.org/LDP/sag/html/index.html Performance…
on “My £4 a month server can handle 4.2M requests a day” ↗…find things but you should know your way around it: $ man bash Intro, Fundamentals: BASH Programming - Introduction HOW-TO: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html You'll get here soon enough: Advanced Bash-Scripting Guide: http://www.tldp.org/LDP/abs/html/ Ideas: http://www.bashoneliners.com/ http://www.commandlinefu.com/commands/browse http://www.catonmat.net/sitemap/
on “Ask HN: Best Open Source Beginners Book for learning Shell” ↗…scripts. With PAM we could have even be able to use kerberos to control the security... I could have done lots of things... I still can ... Bash I still hate you for not documenting this, and more YOU Advanced Bash Scripting guide for being so awesome and missing that. ABS you failed me. http://www.tldp.org/LDP/abs/html/functions.html
on “Not a bash bug” ↗You might like the Advanced Bash Scripting Guide. To quote: "This tutorial assumes no previous knowledge of scripting or programming, yet progresses rapidly toward an intermediate/advanced level of instruction... It serves as a textbook, a manual for…
on “Ask HN: How to be a good bash script writer?” ↗The Advanced Bash-Scripting Guide is a good resource as well: http://www.tldp.org/LDP/abs/html/abs-guide.html
on “Bash Academy” ↗Work through the Advanced Bash Scripting Guide (http://freecode.com/projects/advancedbashscriptingguide/). It's a great resource and is one that I turn to when I need to remind myself of how to do something.
on “Ask HN: How can I get better at bash?” ↗