[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reading whitespaces and beginning and end of line
From: |
sancho1980 |
Subject: |
reading whitespaces and beginning and end of line |
Date: |
Fri, 7 Dec 2007 02:49:55 -0800 (PST) |
hi
i have a script that reads lines from a file in this manner:
cat infile | while read line
do
echo "$line" >> outfile
done
The problem I have occurs whenever there is a whitespace at the end of a
line in the input file, because this whitespace get automatically truncated
from "$line", and i dont want that..i want the whole line to go into
outfile, no matter if the last characters are whitespace!
thanks very much
martin
--
View this message in context:
http://www.nabble.com/reading-whitespaces-and-beginning-and-end-of-line-tf4961271.html#a14209878
Sent from the Gnu - Bash mailing list archive at Nabble.com.
- reading whitespaces and beginning and end of line,
sancho1980 <=