I have a file like this
/*
Created by Bla bla bla
Copyright by XYZ
December 20th, 2020
*/
"car" = "Carro";
"door" = "Porta";
I would like to read this file line by line and copy to another file.
So I have this bash script
file='file.txt'
output='output.txt'
touch $output
for oneLine in $(cat ${file})
do
echo "$oneLine" >> $output
done
when I open the output file this is what I see
/*
Created by Bla bla bla
Copyright by XYZ
December 20th, 2020
Project/
Files/
Images/
Sounds/
in other words, when the parsing arrives at the line containing the *\ it prints a list of directories that in fact are directories that exist at the same level of the input and the output files.
How do I solve that?