I can tell you that in ksh there are some minor differences between Sun and HP-UX.
On Sun you will have no problem doing:
but on HP-UX you will have to put double quotes around $VAR.
Also when doing a string comparison, on Sun you can do
but on HP-UX, you can't have the double equals.
There are probably more, but those are a couple I can think of off the top of my head.
if you stick to having double quotes around variables and using only 1 "=" sign for shell tests, you will not notice any difference on the shell scripts aside from the OS-specific external commands ... if you want a portable script that does the same thing on different platforms, have the script check for the OS and then put in the OS-specific command lines as required ...
Hello... and thanks in advance for reading this or offering me any assistance
I'm trying to understand specific differences between the various login scripts... I understand the differences between interactive vs non-interactive and login vs non-login shells... and that's not where my question... (4 Replies)
Hi All,
I need some urgent help regarding some info.
I have a cluster of servers for which I have two scripts for management.
control.sh is a bash script meant for restarting/stopping the servers.
manger.ksh is a kshell script. It is a master script to manage restarting/stoppping and... (3 Replies)
Hi,
I am confused between using here document and using expect for writing interactive shell scripts(like changing password ,FTP or doing su).
My questions are :
1)Why here documents cant change password from shell script.
2)Why we need to use expect for same?
3) Can Sourcing a script can do... (2 Replies)
Hi,
I have perl script abc.pl which runs perfectly fine on windows ( execution from cmd).
Now i tried to execute the same perl module on the AIX server after defining the captureoutput.pm and other relevant changes.
But its behaving very weirdly as a portion of the URL which is formed by... (3 Replies)
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
What is the difference between calling the sub scripts of below two line.
/home/scripts/devdb.sh
. /home/scripts/devdb.sh
sh /home/scripts/devdb.sh
We are using the suse 2.0 version (4 Replies)
Hi
I am getting some errors when i am running the shell script using the following syntax:
>abc.sh
but the same script works fine with the following syntax:
>sh abc.sh
wats the difference in both....please help
thanks in advance. (6 Replies)
Could someone tell me if there is any difference in using square brackets single or doubled pair?
So, do those two some how could be treted by shell differently:
if ; then <statements;> else <statements;> fi
and
if ] ; then <statements;> else <statements;> fi
Maybe any one could... (5 Replies)
Is there any difference in executing the shell using sh and . and ./.
I had a shell script and i observed that anyone is ale to execute the script eith sh even without having the execute permission.how is so? (2 Replies)