Hi Murphy.
I executed the following : ls -l /usr/bin/ksh and the result is this :
-r-xr-xr-x 5 bin bin 290006 Jul 18 2010 /usr/bin/ksh
So this matches the result from ls -l /usr/bin/sh.
I also did a diff /usr/bin/sh /usr/bin/ksh and got nothing. So can i safely confirm that the file usr/bin/sh is same as file /usr/bin/ksh? Therefore the default shell in my case is actually a Korn shell even though the command echo $SHELL output /bin/sh?
The Output of the command echo ${.sh.version} is :
sh: ${.sh.version}: 0403-011 The specified substitution is not valid for this command.
This expansion only works in ksh93 and it means that you are using a 1988-version of the Korn shell. You can verify this by switching to vi-style command line editing mode and then pressing "CTRL-V" in command mode:
This is the output of an AIX 5.2-shell and shows a 88 version, revision "f".
To partially answer your original question: a POSIX-compliant system (which AIX is) is required to have a POSIX-shell in /bin/sh. If this is a link to another shell or an original binary doesn't matter. The user just can rely on the fact that issuing "/bin/sh" on the commandline will invoke a POSIX-compliant shell somehow.
What the requirements for a POSIX compliant shell are is laid down in the POSIX standards papers, issued and developed by the IEEE. What that in detail means i don't (read: never wanted to) know as i took IBMs word for their implementation of the shell being POSIX compliant at face value, but you could easily find that out by reading the paper and cross-checking it with the ksh documentation.
Hi,
Please assist me why HC alias is not working under this shell?
root@singapore # grep HC /.profile
alias HC='cd /var/tmp/HC/2015/`date +%B`'
root@singapore # . /.profile
Sourcing //.profile-EIS.....
root@singapore # echo $HC
root@singapore # HC
HC: not found
root@singapore # echo... (18 Replies)
Hi,
The problem I have is that I want to create a list of folders whose names are read from a text file but the file names are in decimal. Each letter consists of an octet and the end of the folder name is defined by the white space character (0032)
For example, we have in the text... (2 Replies)
Hi All
I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell.
Some operations like calculation don't work :
cat ${file1} | tail -$((${num1}-${num2})) > ${file2}
Is it possible to activate Korn Shell... (3 Replies)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (5 Replies)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (1 Reply)
Does anybody know how to Accept a “userid” as a command line argument on a Unix Bourne Shell Script?
The output should be something like this:
User userid has a home directory of /path/directory
the default shell for this user is /path/shell (1 Reply)
I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done.
I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Hi,
I wanted to know what is the maximum length of command which can be run on a bourne (sh) shell? Where can I find that information? Is it different for different OS flavors?
Please help.
Thanks,
Vineet (10 Replies)
Bourne: How to invoke an alias from within a shell script
If I type in the alias in the command line, it runs
If I insert that same alias into my shell script and run the shell script, the alias is not invoked.
Help please. (2 Replies)