I am writing a sh shell script and I need to read a file line-by-line into
a variable without changing the lines. I am using a While loop as shown below
but it is stripping off leading spaces and multiple spaces in the line it is
reading in! Does anyone know a way to read in a file line-byline without
modifying the line?
Script currently being used:
while read j
do
tc_title=$j # store the TC title line in variable tc_title
echo "$tc_title" >> $temp_dir/temp_9
done < $tc_files_dir/$i
Thanks for any help.