- Variables in AIX inside a test can be without a preceding "$". (This won't work in Linux, so you have to insert a "$" before each variable in a test. Another solution is duplicate "[[" instead of leaving "[ ]" for your test.)
Ahem, this won't work in AIX either. The only place where you can skip the "$" and have the variable expanded anyway is inside double-brackets:
This is standard ksh and it will definitely work in Linux-ksh as well as in AIX-ksh.
Quote:
Originally Posted by Kibou
- 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.
The rule is: the comparison will work, regardless if the variable is quoted or not. The problem one avoids with quoting variables is this: if the variable contains whitespace, the expanded variable will lead to a syntax error once it is expanded, because the shell treats the resulting expanded value as two (or more words):
Quote:
Originally Posted by Kibou
- You have to change the extension of your scripts that are .ksh into .sh.
You might want to do that because otherwise it would be misleading, but it is not required at all. The OS only cares for the shebang and the executable flag and whcih extension the file has doesn't matter at all.
Quote:
Originally Posted by Kibou
- 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
In AIX "/bin" is a link to "/usr/bin". This is one of my 7.1.3-testsystems:
Quote:
Originally Posted by Kibou
- tail -n +2 but without -n doesn't work in Linux.
According to the POSIX documents this ("-n <number>") is the modern and suggested form and should be used anyway. If at all the old syntax is only supported for backwards compatibility purposes.
hi all
i m working in a company ...and i have to migrate a C application running on SCO-UNIX to Red hat linux.
can anybody tell me what is the difference between C commands and shell scripting on SCO-UNIX and LINUX.
best regards
harsh (3 Replies)
I am trying to set some environment variables in a shell script which is written in Kshell. I am invoking this script in .profile. The problem is envirnment variables are set within the script but after exiting the script those are gone. I don't have any problem with If I have Kshell as my default... (0 Replies)
Dear All,
What points should i keep in mind while migrating scripts from HP-UX to AIX.
Are there any notes available for this?
cheers,
vishal (1 Reply)
Hi All,
I am currently facing new problem of migrating C(c language) application from AIX machine to Linux machine. We are using GCC to compile the source code..
But facing with the compilation issues, with lot of GCC C libs differing between AIX box to Linux box...
Pls help me... (1 Reply)
Hi All,
I am currently facing new problem of migrating C(c language) application from AIX machine to Linux machine. We are using GCC to compile the source code..
But facing with the compilation issues, with lot of GCC C libs differing between AIX box to Linux box...
Pls help me... (1 Reply)
We are changing our OS from HP-Unix 11 to Linux Red Hat. We have few k- shell, c - shell and sql scripts which are currently running under HP-Unix 11. Will these scripts work on LINUX as it is? or we need to do any code changes?IS there anyone who have done this kind of migration before?Thanks for... (2 Replies)
We have certain number of scripts that run on AIX server using ksh.
Now that we migrate these scripts to Linux servers.
We need to know what are the changes that we have to perform in script to make it compatible to run on Linux.
Say like in our Unix -AIX "print" command worked.
But that did... (6 Replies)
I'm New to AIX / VIOS
We're doing a FC switch cutover on an ibm device, connected via SAN.
How do I tell if one path to my remote disk is lost? (aix lvm)
How do I tell when my link is down on my HBA port?
Appreciate your help, very much! (4 Replies)
Hi,
recently we have migrated our current AIX server to Linux, we have lot of shell script, few of them are FTP scripts.
we have copied the complete AIX file system to linux 7.2 as it is.
could you please highlight what are the things we need to look into it .
in AIX we are using .netrc to... (3 Replies)