I hava a column in database which contains the following data:
sql_proc|test_sql.sql|/home/Desktop/myfile.txt|$IMP_FILES/myFolder|convert
I have fetched this into a variable and I have used the cut command with "|" as delimiter and saved each field in a different variable. Now let's consider VAR4 holds 4th field, i.e $IMP_FILES/myFolder. $IMP_FILES is an environment variable with value /home/OffFiles/Module.
How can I use VAR4 in order to get /home/OffFiles/Module/myFolder?
Using
bash -c:Using
eval:Example:
It will print the environment variable paths twice.