Conclusion
Scripts, even if adhering to the strictest possible conformance to Bourne Shell language, can encounter problems when run in Bourne Again Shell. Some of the problems will be very apparent (as shown, throwing syntax errors), while others could be more subtle (as shown, main program global variables not modified as expected). Vice versa, if sound quoting has been applied, and if no assumptions about sub-processing pipeline components have been made it is – apart of some potential name-clashes with new built-ins – very likely that Bourne Shell script code is forward-compatible to Bourne Again Shell.
- Bourne to Bourne Again Shell Forward Compatibility
- Print XDG Desktop Definition for Application
- Using sed or awk to ensure a specific last Line in a Text
- Make a Bourne Again Shell Script Log its Output to a File
- Maintaining Multi-Line “stat” Formats using Bourne Again Shell
- Print all indented Lines following a non-indented Line
- An Introduction to Programmable Completion in Bash
- Match-Resumption in case…esac of Bourne Again Shell