unix exit argument [message #134732] |
Fri, 26 August 2005 08:52 |
alanm
Messages: 284 Registered: March 2005
|
Senior Member |
|
|
Hi All,
I log in as root user to our unix server and have a script which I want to protect. I have used the following code segment
if [ `whoami` != 'oracle' ]
then
echo "Error: You must be user oracle to execute."
exit
fi
however, there is an issue in that my telnet session closes after the exit command. what argument do I need to stop the script from running but not close down my telnet session.
cheers
Alan
|
|
|
Re: unix exit argument [message #134993 is a reply to message #134732] |
Mon, 29 August 2005 06:15 |
girish.rohini
Messages: 744 Registered: April 2005 Location: Delhi (India)
|
Senior Member |
|
|
I hope this should work for you:
if [ `whoami` != 'oracle' ]
then
echo "Error: You must be user oracle to execute."
else
"Put Everything here"
fi
Regds
Girish
|
|
|