Joined: Tue Mar 23, 2010 7:39 am Posts: 2
|
|
Hi, I would like to set a value to a variable which is within a string. example will give you better understanding
one file contains a string lets call him 'stringFile' ${install_path}/some/path/file.txt
now a bash script is reading this file and contains a variable install_path like this #!/bin/bash
install_path="/usr/local" while read line do echo "$line" done < stringFile
Output of this script is: ${install_path}/some/path/file.txt but i would like that the outpus is: /usr/local/some/path/file.txt
how to achieve this? Thank you.
|
|