March 2002
Beginner
504 pages
10h 47m
English
In this chapter, you learned how to determine which version of UNIX is running using uname. In addition, you developed the getOSName and isOS functions to help adapt shell scripts to multiple versions of UNIX. You also looked at the following techniques for improving the portability of shell scripts:
Conditional execution
Abstraction
In conditional execution, the flow of a script was modified depending on the version of UNIX being used. In abstraction, function implementations were altered to account for the differences between versions of UNIX; the overall flow of the script remained the same.
Using the techniques and tips in this chapter, you can port shell scripts across different versions of UNIX.
Read now
Unlock full access