View Single Post
Old 25th May 2011, 03:23
cj09 cj09 is offline
Junior Member
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Issue when running a bash script

1) Environment:Red Hat Linux bash shell

Script to be run owned by user :myUser
Home environment of myUser: pathto/home

2) ESP agent with root access will run
su - myUser -c "/pathto/home/bin/"
where has some echo statements and an exit statement in the end

Current behaviour when running the script:

(and then the control remains on the following path)
(have to print "exit" to get the output of echo statements and ctrl back to root@ServerName1

Expected behaviour when running the script:
  • Runs /pathto/home/bin/
  • Prints the echo statements
  • ctrl is root@ServerName1
Any suggestions how to fix the issue ?

Thanks for help.
Reply With Quote
Sponsored Links