I'm writing a Bash script to read from an input file and write my changes out to an output file. I'm using read and for some reason, it is stripping the leading spaces off of each line. I didn't see any flags in read to turn the stripping off. I'm also runnig this in cygwin, but I don't think that should matter.
The code I am using is something like this.
while read curline;
do
echo "current line " $curline
if [ ! -z "$curline" ]; then
while read outline;
do
echo "$curline" >> $Output_Work
fi
done < $Input_Work
Am I doing something wrong here?
thanks,
Jerome