Listmates, I stumbled on a problem trying to read a file (email mailbox) line-by-line in bash. Using the built-in read, it strips the leading whitespace from each line making the subsequent write impossible. I was using a while loop as follows: { while read XTAG VALUE LINE; do if [[ ${XTAG} == "X-Mozilla-Status:" ]]; then case ${VALUE} in 1019 ) NEWVAL=1011;; 1009 ) NEWVAL=1001;; 001b ) NEWVAL=0013;; 0019 ) NEWVAL=0011;; 000b ) NEWVAL=0003;; 0009 ) NEWVAL=0001;; * ) NEWVAL=${VALUE};; esac echo -e "${XTAG} ${NEWVAL} ${LINE}" >> ${NEWFILE} else echo -e "${XTAG} ${VALUE} ${LINE}" >> ${NEWFILE} fi XTAG=''; VALUE=''; LINE=''; NEWVAL='' done } < ~/.thunderbird/2k12pnl0.default/Mail/pop.suddenlinkmail.com/openSuSE.sav All of the lines in the mailbox with leading whitespace were written without the leading whitespace like: original file: Received: from edge03.suddenlink.net ([195.135.221.135]) by imta03.suddenlink.net newfile: Received: from edge03.suddenlink.net ([195.135.221.135]) by imta03.suddenlink.net Is there a bash trick that will preserve the whitespace? -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org