Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
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/script.sh"
where script.sh 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/script.sh
  • Prints the echo statements
  • ctrl is root@ServerName1
Any suggestions how to fix the issue ?

Thanks for help.
Reply With Quote
Sponsored Links
Old 13th July 2011, 16:22
gerr1t gerr1t is offline
Junior Member
Join Date: Jul 2010
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post

Your post is very confusing.

Could you paste the contents of jobxxx.sh and script.sh?

Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script for finding and replacement in any web page code (.htm file) vl72 Programming/Scripts 0 19th February 2011 16:12
I can't finish install due a problem Sam9999 Installation/Configuration 7 17th September 2010 23:33
help with php running as cgi script in Apache opensuse 11.3 wildnux Server Operation 2 13th September 2010 14:01
Internet Explorer won't connect to my server wctaelectronics Server Operation 10 27th October 2008 22:14
https protocol stops page load tjd General 7 18th November 2007 19:06

All times are GMT +2. The time now is 03:16.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.