Openunix.eu


Scripting

These parts of scripts were tested mainly on Linux and on Solaris. In fact, what works on Solaris can well work on Linux, as Solaris uses "V" system syntax and much older BASH version. The opposite is not true. Of course you have to specify the interpreter on the first line of your script and that can be a differentroute:


A lot of these scripts written for bash will work in sh as well, however some functions and attributes have different syntax, such as
echo -n "Johny"
equals to
echo "Johny" \c

in bash. Whereas other functions or attributes do not work for sh at all. KSH is another very intelligent shell, and most Bash stuff works there too.

Various ideas and solutions are listed under more or less intelligently labeled bookmarks uder Scripting. Feel free to use them as I have not invented them but found similar cases elsewhere on the Internet and in the books.

 

Powered by OpenBSD. Puffy on duty!