March 2002
Beginner
504 pages
10h 47m
English
There are two common techniques to increase the portability of a shell script between different versions of UNIX:
Conditional execution
Abstraction
Conditional execution alters the execution of a script based on the system type, whereas abstraction retains the same basic flow of the script by placing the conditional statements within functions.
A script that uses conditional execution for portability contains an if statement at the beginning that sets several variables indicating the set of commands to use on a particular platform. This section looks at two common cases in which conditional execution is used:
Determining the remote shell command
Determining the proper method of using the ...
Read now
Unlock full access