- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: csh and ksh shells
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2006 07:42 AM
тАО11-12-2006 07:42 AM
Our one of the weblogic server startup script is configured to start as a user whose environement shell varibale
is setup in csh ( c shell ).
If i start the weblogic start up script changing the shell in ksh korn shell; will it cause any issue ?
Thanks,
Shiv
Solved! Go to Solution.
- Tags:
- ksh
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2006 08:12 AM
тАО11-12-2006 08:12 AM
SolutionIt doesn't matter that a startup script written in one shell language starts another script written in another language.
What matters is that the interpreter declared on the "she-bang" line --- the first line of a script that begins with "#!" --- matches the command syntax in the body of the script.
That is, if you write:
#!/usr/bin/csh
...then the syntax used afterwards is C-shell.
That does *not* prevent you from launching another script that is written in the Korn or Posix shell, however. For instance:
#!/usr/bin/csh
...
/usr/local/bin/mything
...where '/usr/local/bin/mything' is a Korn shell script.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2006 08:20 AM
тАО11-12-2006 08:20 AM
Re: csh and ksh shells
ksh "export DISPLAY=xxx.xxx.xxx.xxx:0.0"
ksh "export PATH=$PATH"
csh "set display=xxx.xxx.xxx.xxx:0.0"
csh "set path=( $path )"
You have to checl and maybe modify that script if you want to use ksh.
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2006 08:32 AM
тАО11-12-2006 08:32 AM
Re: csh and ksh shells
once i become that particular user which uses c shell; i am not able to use "$set -o vi" which i usually use to access previous commands.
i usually use ksh shell to access previous commands by executing $set -o vi.
just wanted to know if i execute ksh and then run the startup script.. will it impact anything ?
Regards,
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2006 09:10 AM
тАО11-12-2006 09:10 AM
Re: csh and ksh shells
If you just want to have commands history under csh. You can try "history", it will list the commands you have typed. "!2" will excute the command you have run the one befire last command. Read manpage of csh to have more information on command history.
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2006 09:32 AM
тАО11-12-2006 09:32 AM
Re: csh and ksh shells
> You wrote, "once i become that particular user which uses c shell; i am not able to use "$set -o vi" which i usually use to access previous commands."
That's true. The retrieval of the shell history of commands using 'vi' is a Posix/Korn method; not a C-shell ('csh') one.
However, once you are in the 'csh' you can switch to 'ksh' or 'sh' by typing the name of the shell in which you want to operate:
# ksh
This starts a new shell, and the environmental variables you had before will need to be reestablished. When you exit this shell, you will return to the predecesor.
> You also asked: "just wanted to know if i execute ksh and then run the startup script.. will it impact anything?"
No, you will not, as I first responded. You can start any binary or script of any kind from any shell type.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2006 09:54 AM
тАО11-12-2006 09:54 AM
Re: csh and ksh shells
Ooops, I meant to write:
This starts a new shell, and the environmental variables you had before will not need to be reestablished."
Consider:
# echo "I am a ${SHELL} shell"
I am a /sbin/sh shell
# export X=shiv
# export Y=jrf
# csh
# echo "I am the ${shell}"
I am the /usr/bin/csh
# echo "${X} asked a question and ${Y} answered"
shiv asked a question and jrf answered
# set Z=ok
# echo ${Z}
ok!
# exit #...going back to original shell!
# echo ${Z}
sh: Z: Parameter not set.
...The last echo of ${Z} shows that the parent does not inherit the child's environment.
Regards!
...JRF...