LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-27-2014, 11:38 PM   #1
connect2linux
LQ Newbie
 
Registered: Aug 2014
Posts: 1

Rep: Reputation: Disabled
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.

Any checklist for conversion of Unix to Linux.

Any info will be helpful.

Regards,
Kumar
 
Old 08-28-2014, 12:42 AM   #2
notKlaatu
Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware
Posts: 897

Rep: Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532
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.

That's all I can think of off the top of my head.
 
1 members found this post helpful.
Old 08-28-2014, 10:09 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,933

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
Quote:
Originally Posted by connect2linux View Post
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.
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.

There are no easy answers.
 
1 members found this post helpful.
Old 08-28-2014, 10:12 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
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.
 
1 members found this post helpful.
Old 08-28-2014, 11:40 AM   #5
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,165

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP hangs on Fedora 17. Same scripts works on AIX/Solaris/HP-UX and Redhat. Ryan Robinson Linux - Newbie 2 01-10-2013 07:14 PM
A serious problem when migrating C programs from Aix to Linux (gcc) olivexer Linux - Software 3 11-22-2011 06:25 AM
Migrating from HP unix to Redhat linux sudhiroracle Red Hat 4 06-14-2011 10:14 AM
Migrating from UNIX environment to LINUX redhat rel 5 pallavibhat89 Linux - Newbie 3 03-10-2011 08:22 AM
LXer: AIX Unix LVM Destruction Commands. Part Two of Two. LXer Syndicated Linux News 1 07-06-2008 10:15 PM


All times are GMT -5. The time now is 06:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration