invoke ksh in SunOS 5.7


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting invoke ksh in SunOS 5.7
# 1  
Old 07-03-2006
invoke ksh in SunOS 5.7

Hi I have the following in .kshrc file

set -o allexport
HOSTNAME=$(uname -n)
HISTSIZE=50
EDITOR=vi
ENV=$HOME/.kshrc
PATH=$HOME/bin:/usr/bin:/usr/local:/etc/bin/:/bin:/usr/local/bin:.
bind =complete
set +o allexport
clear

and I have the following in .profile

umask 077
MANPATH=$MANPATH:/usr/man:/usr/share/man:/usr/X11R6/man:/usr/local/man
#MANPATH=$MANPATH:/usr/local/lib/perl5/man
PS1="[muru:\w]"
alias mk="make -f demo_proc.mk build prob EXE=prob OBJS=prob.o"
alias ho="cd /store/store3/cse.pub/marty/cop6726"
#stty erase ^h
PATH=$PATH:/bin:/usr/local/bin:/usr/X11R6/bin:/usr/ucb:/usr/tools/magic-6.5/bin/
export PATH=/usr/local/j2sdk1.3/bin:.SERVLET.JAR:$PATH
alias d="dict"
LD_LIBRARY_PATH=/usr/X11R6/lib:/usr/openwin/lib:/usr/local/lib
#export PATH MANPATH PS1 LD_LIBRARY_PATH
TERM=ansi;export TERM
ENV=$HOME/.kshrc; export ENV

my default shell is /bin/bash that is displayed when I execute echo $SHELL

I go to ksh from my defaut shell and it displays the command promt as $ but when I execute echo $SHELL it still shows
/bin/bash.

cat /etc/shells shows the following
$ cat /etc/shells
/usr/bin/bash
/bin/tcsh
/bin/csh
/sbin/sh
/bin/sh
/bin/noshell
/usr/local/bin/bash
/bin/bash

Is it ok? I mean it should show /bin/ksh when u are in ksh right? or am I making a mistake?
Am I not in ksh? then why is the prompt in $ sign?

a few words of explanation would be greatly appreciated.

Thanks
Muru
# 2  
Old 07-03-2006
use echo $0 to see which shell u currently in.
# 3  
Old 07-03-2006
Thanks, it shows ksh.

When I try which ksh it shows /usr/bin/ksh.

Is not a must for the shell executable be in /etc/shells (i am probably wrong here) or since ksh is one of the available shells, doesn't this should be reflected in /ect/shells?

Thanks
Muru

Last edited by muru; 07-03-2006 at 05:17 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Invoke Procedure Help

Hello unix.com users, I reached a dead end with a procedure. My files: x.pl #!/usr/bin/perl use Net::FTP; my $host = $ARGV; my $user = $ARGV; my $pass = $ARGV || ""; my $port = "21"; $ftp=Net::FTP->new("$host", Port=>"$port", Timeout => 5) or die("couldn't connect to host:" .... (2 Replies)
Discussion started by: galford
2 Replies

2. UNIX for Advanced & Expert Users

How to invoke an URL

Hi, I am trying to invoke an service using URL. I want to know how to call that url with nohup. nohup links "__http://Administrator:assword@ServName:8080/invoke/wm.server.admin/shutdown?bounce=no&option=force&timeout=0" & I am trying to run this command on unix command prompt, But in... (8 Replies)
Discussion started by: swap27
8 Replies

3. UNIX for Dummies Questions & Answers

How to invoke ESC+K

How to invoke ESC+K to get recent commands in Korn Shell. In some of the unix machine ESC+K is available and in some machines, it does not work. All of the machines that I work have Korn shell. (5 Replies)
Discussion started by: bobbygsk
5 Replies

4. Shell Programming and Scripting

Not able to invoke a sh script from KSH

Hi all, Iam writing a KSH script which needs to export dispaly to Xwindows and then involke a sh script .. But a core file is getting genrated for reasons not known to me. Please check i need incorporate below mentioend code in my script which iam not abel to .. export DISPLAY=`who am i |... (1 Reply)
Discussion started by: rahman_riyaz
1 Replies

5. Shell Programming and Scripting

Sorting problem (SunOS 5.9 / KSH).

Hi, Can someone tell me why the "LargeFile" is coming first before the smaller files. Is there any way to list the files based on size column. ls -g| sort -k 4 -rw-r--r-- 1 user 6117910528 Apr 28 15:04 LargeFile -rw-r--r-- 1 user 6136832 May 30 07:23 my_20080530.tar -rw-r--r-- ... (2 Replies)
Discussion started by: kesari
2 Replies

6. Shell Programming and Scripting

how to Invoke html in ksh Script

how to invoke html file from a ksh shell plz help......... (4 Replies)
Discussion started by: ali560045
4 Replies

7. Shell Programming and Scripting

Invoke perl program from Ksh

Hi all, Can I invoke a perl script from Ksh script and pass parameters to the perl script. Please do help me.. thanks Maha (10 Replies)
Discussion started by: mahalakshmi
10 Replies

8. Shell Programming and Scripting

invoke same script twice

hey, can I invoke the same script twice simultaneously? I want both instances to run at the same time with different parameters. Thanks! (2 Replies)
Discussion started by: mpang_
2 Replies

9. Shell Programming and Scripting

how to invoke shell script

hi everybody, i learning unix now only.Can u pls guide me in invoking a shell script.Actually i need to know how to write the command for invoking the shell script.Suppose the shell file name is count , then how i will write the command. thanks (1 Reply)
Discussion started by: gopa_mani
1 Replies

10. UNIX for Advanced & Expert Users

Migration of binary file from Sunos 5.8 to Sunos 5.9

I have compiled binary file using "cc" on SunOS 5.8 and the same binary file i have copied to SunOS 5.9 and it is giving me core dump error.I want to know whether migration of compiled code from lower version to higer version created this problem. how can i solve this problem.I am pasting the core... (1 Reply)
Discussion started by: Arvind Maurya
1 Replies
Login or Register to Ask a Question