Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Changing shell in Korn script
Name: Priya Date: March 19, 2003 at 11:22:29 Pacific OS: SunOS CPU/Ram: -
Comment:
Hi,
I am trying to remotely run a korn script in a Linux box as a root user. However, the default shell in the Linux box for root is bash. I want to be able to change the shell from bash to ksh in my Korn script (without having to manually go and change the root's default shell), so that I don't have to worry about setting it everytime I use a new machine (as the script should take care of it).
I have searched and looked hard, but haven't been able to find a way that works. Can someone please help me out....
Name: David Perry Date: March 19, 2003 at 13:01:21 Pacific
Reply:
The shell is declared on the first line of the script
#!/bin/ksh
#!/usr/bin/perl
etc
0
Response Number 2
Name: Priya Date: March 26, 2003 at 16:06:02 Pacific
Reply:
Actually, David, I wanted to be able to exectue a ksh command on say, Linux, although Linux might not recognize the commnad. I figured it out and can make it work by using
ksh -c
example:-
hp uses remsh to log into another session. However, my script runs on Solaris and it doesn't recognize remsh. So, if in my script I say
ksh -c remsh -l .....
both Solaris and HP will be able to execute the command remsh.
Summary: hi, i want to create a directory from my cgi script written in korn shell. but there is no out put. means that this script work for other commands like ls and cd but don't work fo mkdir commands. here...
Summary: I have a simple script that changes directory- cd /newdirectory pwd - when I run this it seems to execute correctly, but after it executes I'm still in my original directory. I guess I'm changing dire...
Summary: I have written a script to login to various network equip and perform automated functions. Is there a way to hide the input from the keyboard on read in Korn shell. read USER?"UBR Login:" read PASS?"...