Eek, I wrote:

> while read fn </tmp/tabs.auto.filelist.txt; do
>     sed 's/   /    /g' < $fn > /tmp/notabfile
>     mv /tmp/notabfile $fn
> done

But that is wrong... it will read the first line from file line over and over 
again, it seems. The correct syntax  would be:

while read fn; do
    sed 's/     /    /g' < $fn > /tmp/notabfile
    mv /tmp/notabfile $fn
done </tmp/tabs.auto.filelist.txt

/me blushes.

I admit that having to have the redirection of input to the while loop at the 
end, after the "done", does make it harder to read, especially if the loop is 
long. In this case the loop is not long, but still... so yeah, using "cat" here 
to pipe the file into the while loop is clearer, even if it introduces an extra 
process and pipe.

--tml


_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to