Issue when running a bash script

Discussion in 'Programming/Scripts' started by cj09, May 25, 2011.

  1. cj09

    cj09 New Member

    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:
    [email protected]>./

    (and then the control remains on the following path)
    [email protected][pathto/home]
    (have to print "exit" to get the output of echo statements and ctrl back to [email protected]

    Expected behaviour when running the script:
    [email protected]>./
    Any suggestions how to fix the issue ?

    Thanks for help.
  2. gerr1t

    gerr1t New Member

    Your post is very confusing.

    Could you paste the contents of and


Share This Page