Pure Sh Bible
I feel the same way about "advanced" shell scripting techniques as I do about "cutting-edge" accounting techniques: someone's probably going to jail.<p>I have written some big complex systems in shell and regretted it.
My rule of thumb is that if a script needs error handling, it's time to write it in a real programming language. Tricky shell programs running as root are a real danger.<p>It's nice to know that some of these techniques exist, but better not to use them. Many of them have to do with string manipulation, which is a sign that a proper language with data structures would be a win.<p>Many people don't realize that perl is part of the Debian base system. If you are going to go crazy with one-liners, then that's a better tool. I would generally recommend Python, though.<p>Avoiding bash-isms is useful so that you can run under busybox shell, reducing the size and dependencies of containers.<p>Embedded systems often use shell. If you are tempted to install bash for more power, a better solution is probably lua. It's smaller and saner.