Migrating shell scripts
Could you please give me some steps or a check list to follow to migrate these from unix to linux?
Looking for relevant Microsoft Windows Whitepapers? Visit the SearchEnterpriseDesktop.com Research Library.
Petkoa
765 pts. | Aug 4 2008 10:39PM GMT
Hi Chunter,
You got a nice advice from Nopius - I’d underline the importance of the last step (#5 :o)).
Some points where I recently got problems:
(1) It’s frequent practice to place /bin/sh in the she-bang (#! … in the first line of the script) of the shell scripts. /bin/sh is usually a link to the default shell and the default shells are different under different unix and linux flavors. Couple weeks ago I hit such a problem with an installation module of a commercial package with code suitable for SGI Irix and linux - it appeared that the /bin/sh in Irix (and I believe in some other unices too) points to ksh (Korn shell) which is quite unusual under linux and some distributions lack it (mine too :o((). So be sure to find out what /bin/sh is and to download and install the actual shell if your distribution does not have it.
(2) Directory structures could differ - and even worse, one can decide to optimize directory structures for some reason and forget to change scripts which depend on these structures - this happened to me couple of days ago (btw, without any migration).
Good luck,
Petko