Results 1 to 3 of 3
I have 3 files.
setvariables.sh
unprocessed.txt
process.sh
setvariables.sh just contains a list of export variables, that's all.
unprocessed.txt is an "unprocessed" file full of undefined variables.
I want process.sh to ...
- 08-27-2008 #1Just Joined!
- Join Date
- Aug 2008
- Posts
- 1
Substituting variables in cat output
I have 3 files.
setvariables.sh
unprocessed.txt
process.sh
setvariables.sh just contains a list of export variables, that's all.
unprocessed.txt is an "unprocessed" file full of undefined variables.
I want process.sh to first execute setvariables.sh, then cat (or whatever would make this work) the unprocessed.txt file outputting a processed file with the variable definitions from setvariables.sh
This has to be easy... any ideas?
- 08-30-2008 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
You could try something like:
No idea if it'll work - but it might give you some clues, at least.Code:. ./setvariables.sh TEXT=$(<unprocessed.txt) eval echo "$TEXT"
- 08-30-2008 #3
Maybe you can use parameter substitution?
Can't tell an OS by it's GUI


Reply With Quote