08-14-2006
In trying to find the Korn version, I tried these 2 ways found in another thread. Both didn't give me an answer.
>print ${.sh.version}
ksh: ${.sh.version}: 0403-011 The specified substitution is not valid for this command.
>what /bin/ksh | grep Version
>
At logon time I get this as the possible O/S version ?
* Operating system ..: AIX (64Bit)
* Version / release .: 5.2
Accessing the manual on anything is not helpfull as nothing seams to be defined in 'man'.
>man ksh
Manual entry for ksh not found or not installed.
>man ls
Manual entry for ls not found or not installed.
>man ps
Manual entry for ps not found or not installed.
>man cd
Manual entry for cd not found or not installed.
>man
Usage: man [[[-ct] [section]] | [-f | -k]] [-M path] [-r] name...
If I do like you said, I get an error :
>. MyAlias.sh
ksh: MyAlias.sh: not found
I found another script who's first line is '#/bin/ksh' and not '#!/bin/ksh' but using either method simply doesn't work with my script :
>./MyAlias.sh
>ll
ksh: ll: not found
>. MyAlias.sh
ksh: MyAlias.sh: not found
That other script I mentioned actualy works as I ran it last week. Could it be that the problem is isolated to the ALIAS command in scripts ?
In finding other shells I have access to :
>ls /bin/*sh*
...
/bin/bsh
/bin/chsh
/bin/csh
/bin/ksh
/bin/ksh93
...
in /etc/passwd, my ID is there with '/usr/bin/ksh' at the end. So I assume, at logon, I fall into Korn shell ?
Assuming the problem is isolated to ALIAS commands in a shell script, I modified my script to :
#!/bin/ksh
#set -x
#
#--------------------------------
# Alias Script
# created on : Aug-9, 2006
# created by : fapicard
# modified on:
#
# description : simply alias commands that I
# need for my work to make it easier
#---------------------------------------
echo "before alias"
alias goto_ae='cd /usr/local/Tivoli/custom/policy'
alias ll='ls -al'
echo "after alias"
>./MyAlias.sh
before alias
after alias
I executed it and got the echo printouts. So there is a problem with the ALIAS but why ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
cron starts a job every 10 minutes via a korn shell - I need to determine if the previous process is still running before I allow the new process to start - HELP
I've tried ps -ef, etc but I have seen many situation where it says that the is running when it is not - any ideas on how to absolutely... (2 Replies)
Discussion started by: jph
2 Replies
2. Shell Programming and Scripting
well i have this code here..and it works fine in kornshell..
#!/bin/ksh
home=c:/..../
input=$1
sed '1,3d' $input > $1.out
line=""
cat $1.out | while read a
do
line="$line $a"
done
echo $line > $1
rm $1.out
however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Discussion started by: forevercalz
21 Replies
3. Shell Programming and Scripting
I am sorry, this is really trivial, yet I am not able to understand what the problem is!
I am using korn shell and running this script
#!/bin/ksh
keep=3
while ; do
echo $keep
keep=$(($keep-1))
done
I am getting this error: `keep=$' unexpected
I am not able to understand it because ... (1 Reply)
Discussion started by: Asty
1 Replies
4. Shell Programming and Scripting
hey everyone,
For my studies i had to write a javaprogram which reads 2 integers from the keyboard and then using the basic operations(addition, division etc) with them. so far no problem. but now i gotta make a shell-script which:
runs the program(compiled with javac)
#!bin/ksh
java... (1 Reply)
Discussion started by: simlmf
1 Replies
5. UNIX for Dummies Questions & Answers
How would i instruct the current shell to run the current script using the korn shell? (1 Reply)
Discussion started by: JamieMurry
1 Replies
6. Solaris
I have a newly built Solaris 10 server that I want to install Sun One web server. After building the server I use FTP to copy over the web server installation files into a directory I created (/usr/local/software/JES/6.1sp8). I run ./setup and get this.
bash: ./setup: Permission denied
I... (7 Replies)
Discussion started by: gsander
7 Replies
7. Shell Programming and Scripting
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)
Discussion started by: madmat
3 Replies
8. Shell Programming and Scripting
I'm learning bash and have discovered that the shell can only work with integers and not decimals.
I'd like to run my scripts in korn to account for this, but just now, when I tried to run my script, I got an error message that said 'no such file or directory,' even though when I'm in the shell... (3 Replies)
Discussion started by: Straitsfan
3 Replies
9. Red Hat
Ive kind of been left on my own to get things working on a production linux box. Im happy because it gives me some true admin experience. But theres alot I dont know ...
Im trying to get mailx running. I can create an email, but it never gets delivered to my external email account.
I am... (2 Replies)
Discussion started by: popeye
2 Replies
10. Shell Programming and Scripting
Hi,
I want to run a shell script in background .
but its going to stopped state
$ ksh cat_Duplicate_Records_Removal.ksh &
8975
$
+ Stopped (tty output) ksh cat_Duplicate_Records_Removal.ksh &
why is this happening?
Also could anyone please tell me what is a stopped... (12 Replies)
Discussion started by: TomG
12 Replies
LEARN ABOUT CENTOS
platform::shell
platform::shell(n) Tcl Bundled Packages platform::shell(n)
__________________________________________________________________________________________________________________________________________________
NAME
platform::shell - System identification support code and utilities
SYNOPSIS
package require platform::shell ?1.1.4?
platform::shell::generic shell
platform::shell::identify shell
platform::shell::platform shell
_________________________________________________________________
DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell.
This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only
requirement is that the other shell (identified by its path), is actually executable on the current machine.
While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell
this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run
32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers.
For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed
packages, versus the architecture of the shell running the repository software.
COMMANDS
platform::shell::identify shell
This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell.
platform::shell::generic shell
This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell.
platform::shell::platform shell
This command returns the contents of tcl_platform(platform) for the specified Tcl shell.
KEYWORDS
operating system, cpu architecture, platform, architecture
platform::shell 1.1.4 platform::shell(n)