Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

commands in subshell

Status
Not open for further replies.

ranjank

IS-IT--Management
May 9, 2003
176
IN
Hi All,

I'm running a bash script where i source one file which contains all the ENV variables and some settings.Once i source that file a subshell is created and rest of the commands in script dosen't get executed.Can anyone guide as how i can run the commands in subshell.

Regards,
Ranjan.
 
How are you sourcing that file? Are you using the source command? Or . filename?

Annihilannic.
 
I'm using file

for e.g :-- ./filename <input paramater>
 
To source a script into an existing script you need to use one of the commands I mentioned. That will run the script in the current shell, and it will mean that any variables that are changed will stay changed. e.g.

[tt]. ./filename <input parameter>[/tt]

or

[tt]source ./filename <input parameter>[/tt]

I'm presuming filename is the one containing the ENV variables and settings.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top