Bourne to Bourne Again Shell Forward Compatibility

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.