The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 07-01-2009
debbie15 debbie15 is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 2
Hi Jim,
I want to substitute the value for ${SourceFilePath} and not create a file with the variable name. file.txt is already existing.

My scenario is like this.

file.txt is present on the TEST & DEV
I want to use the environment variable to point either to TEST or DEV.
So i will have one parameter file
PATH=$SourceFilePath/file.txt

I want to write a script which will generate a new file for the following system
TEST server should create a new file abc.txt with the following content

PATH=/db1/Src/test/file.txt

DEV server should create a new file xyx.txt with the following content

PATH=/db1/Src/dev/file.txt

The command or script must only substitute the value for the environment variable.

Thanks for your input.