Migrating AIX Unix commands/scripts to Redhat Linux
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Migrating AIX Unix commands/scripts to Redhat Linux
HI All,
I am new to Linux environment.
We are in the process of migrating the Unix commands/scripts to the new Linux environment. As far as I know, there won't be any difference between the Unix and Linux environment except the shell name.
Please let me know, if there are any syntax/behaviour difference in Unix and in Linux.
I have never gone from AIX to Linux, but I have gone from Solaris to Linux as well as BSD to Linux.
The main thing would be what you mentioned: the shell the scripts are using. Obviously different shells are going to treat things a lot differently; trying to assign a variable like tcsh does, in BASH, is not going to really work well for you. So I would definitely invoke the same (or most similar) shell as possible, when possible.
Another thing that always gets me when porting scripts are the command's flags. I would double check each command that you use with its equivalent in the GNU or BSD version, and make sure -r (for example) really does exist and does the same thing as what it did on the AIX version.
And finally, the OUTPUT of a command could be surprising. If the AIX version spits one thing out, and your script parses based on that expectation (like by fields or bytes) then you might find yourself getting the wrong data because the Linux version returns info in a different format.
Oh and also syntax. Doesn't happen often, but for more complex things like sed vs gsed or gawk vs nawk or grep, it can sometimes be really severe.
So basically, everything. Check through it all, command by command.
We are in the process of migrating the Unix commands/scripts to the new Linux environment. As far as I know, there won't be any difference between the Unix and Linux environment except the shell name.
There are MANY differences, and AIX is not really Unix, except in name. There is much in common, but it's IBM's own brand, that ONLY runs on IBM equipment. Solaris is much closer to Linux, but there are going to be differences.
Quote:
Please let me know, if there are any syntax/behaviour difference in Unix and in Linux. Any checklist for conversion of Unix to Linux.
There are lots, depending on the command(s) and how you call them. There is no 'checklist'. If you have scripts to migrate, copy them over one at a time, and RUN THEM. See where they fail, look at the lines/commands, then modify them one at a time until you get the desired results.
my frustration with going between aix and linux is that the gnu version of many standard programs (like grep sed awk ...) have more functionality than their unix equivalent.
Linux normally uses bash, although I've met one distro that defaults to zsh, but it's not fussy. I presume you use the Korn shell on AIX — if so, you can use the Linux implementation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.