On Dec 7, 2007 12:49 PM, sancho1980 <[EMAIL PROTECTED]> wrote: > 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!
read the documentation of read. you can either use while read -r ;do echo "$REPLY";done or while IFS='' read -r line;do echo "$line";done