Sponsored Content
Full Discussion: invoke ksh in SunOS 5.7
Top Forums Shell Programming and Scripting invoke ksh in SunOS 5.7 Post 302078646 by muru on Monday 3rd of July 2006 02:53:16 PM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/ksh93 /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/ksh93 /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/sfw/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. NOTES
Restricted shells should not be listed in /etc/shells. SunOS 5.11 1 Nov 2007 getusershell(3C)
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy