AIX UNIX (kshell) to Linux Shell Script Migration. | Unix Linux Forums | Shell Programming and Scripting

AIX UNIX (kshell) to Linux Shell Script Migration. | Unix Linux Forums | Shell Programming and Scripting

AIX UNIX (kshell) to Linux Shell Script Migration. | Unix Linux Forums | Shell Programming and Scripting

- If you want to make your scripts work in bash, I am currently doing a migration from AIX to RHEL and we've found these issues:

- Variables in AIX inside a test can be without a preceding "$" . (This will not work in Linux, so you have to insert a "$" before each variable in a test.) Another solution is duplicate "

- Depends on the code, in my case I have found lots of variables comparing strings without being between double quotes, so we have decided to put double quotes for all variables comparing strings.

- You have to change the extension of your scripts that are.ksh into.sh. You have to change your cronjobs and all your scripts that are being called by other applications (like Control-M) if you still want them to function as they did.

- You have to change the shebang for #! / bin / bash or #! / bin / sh or #! / usr / bin / env sh I do not know which Linux distribution, but be aware of sh and dash for Debian / Ubuntu.

- You have to change the path for commands like, I had something like this in AIX:

/ usr / bin / fuser

and now it has to be changed into

/ bin / fuser

Same for mail.

- We also had to look for all the executables in C and make sure it all works as they used to.

BIRDS OF COLOMBIA / BIRDS OF COLOMBIA Photo Gallery by Robert Scanlon at pbase.com
Neotropical Cormorant / Neotropical Cormorant Herons and Egrets / Herons Bare-faced Ibis / Ibis Caripelado ... / / / / / / Black-necked / Black-necked > Smooth-billed / / Chestnut-collared White-collared < > / Russet-throated / / b> Red-ruffed Golden-winged Golden-breasted > / / / Brown-capped / / Sparrows, Large-billed-Tern.jpg Large-billed-Tern.jpg Large-billed-Tern.jpg Large-billed-Tern3.jpg Red-headed-Barbet2.jpg Red-headed-Barbet.jpg Kingfisher.jpg Squirrel-Cuckoo.jpg Tropical-Mockingbird.jpg Tropical-Mockingbird2.jpg Turkey-Vulture. Greyish-Saltator.jpg Greyish-Saltator2.jpg Black-capped-Tanager.jpg Indigo- Red-crowned-Woodpecker.jpg Saffron-Finch.jpg Scrub-Tanager.jpg Green-crowned-headed-Woodcreeper.jpg Yellow-legged-Thrush.jpg WVPlumeleteer.jpg

- We had to find out the way to which script depends on another script. and which scripts are the parent scripts.

- We used sh -x to execute each script to search for anything strange or any possible errors. to nd then we commented each loop and test so we could execute each action of the script and see if any errors came.

- tail -n +2 but without -n does not work in Linux. p>

- We have found a few variables that were not declared and this was because they forgot to change it in an old migration they did from HP-UX to AIX.