I am programming in bash and I want to call some of the results, as variables, so they can be printed at the title of some graphs. In my script I choose some elements of an array and put each one of them in a single file.dat. For example:
cat Variables.dat | awk 'FNR == 2 {print $1}' > Variable1.dat    
Now, the file Variable1.dat, contains only a single value and I want to use this value as a variable in my script. I tried several things like:
Var1="$Variable1.dat"    or  Var1=$(echo "$Variable1.dat" )         
and they do not work. Any ideas? Thank you in advance.
 
    