I am trying to use sudo command in unix shell script. Its that it will do sudo and then search a file in the directory and then come out of the sudo account
my account = saurav
here is the script code
********************************
sudo -u abcd -s
cd /application/somefolder/
id
grep jdbc

racle:thin server.properties
********************************************
now how do i come out of the account to which i sudo, i can always use CTRL+D / ctrl + x from the prompt, but what should be used in the script to get out of the account back to my own account.
which is from abcd to saurav
Well i cannot change the sudoers property, since i am not the admin/root
This is the only way to work out in my environment, and using exit in the script just closes the script it doesnt come out of the sudo user.