Hello people!!
Whith an script, I want to set the name of an output file employing the name of a variable: e.g.:
while read code
do
out=$code
done < input >> $out.txt
However, the name of the output file I got is '.txt'. But
if i do 'echo $out', i can confirm that the variable has the value i want.
I solved the issue by doing:
done < input >> temp.txt
cp temp.txt $out.txt
rm temp.txt
but this doesn't look so nice
any idea??
Thanks in advance!