Re: Whitespace problem with bash script for Icedove

2011-07-26 Thread Mark Neyhart
Jimmy Wu wrote: > 1. Just use the shell's globbing - it was meant for this purpose - > instead of assigning a glob to a variable. Glob expansions can be > iterated over in loops correctly and safely. Expanded strings are > much more tricky to get right (if it is even possible) and less safe > wh

Re: Whitespace problem with bash script for Icedove

2011-07-25 Thread Stanisław Findeisen
On 2011-07-25 20:07, Bill M wrote: > Hi folks, > > I'm piecing together a small script to remove duplicate messages from > various directories in Icedove. By default the files are stored in a > directory called 'Local Folders' - with the space - and this seems to be > creating a problem for bash.

Re: Whitespace problem with bash script for Icedove

2011-07-25 Thread Jimmy Wu
On Tue, Jul 26, 2011 at 02:40, Mark Neyhart wrote: > Bill M wrote: > >> FILES=/home/bill/.icedove/qjimvr85.default/Mail/Local\ >> Folders/2-Personal.sbd/* >> # or "/home/bill/.icedove/qjimvr85.default/Mail/Local >> Folders/2-Personal.sbd/*" >> >> for i in $FILES [...] > > This appears to be relate

Re: Whitespace problem with bash script for Icedove

2011-07-25 Thread Mark Neyhart
Bill M wrote: > FILES=/home/bill/.icedove/qjimvr85.default/Mail/Local\ > Folders/2-Personal.sbd/* > # or "/home/bill/.icedove/qjimvr85.default/Mail/Local > Folders/2-Personal.sbd/*" > > for i in $FILES > do > mv "$i" ""$i".saved" > formail -D 65536 .msgid.cache -s < ""$i".save

Re: Whitespace problem with bash script for Icedove

2011-07-25 Thread Michael Checca
On Mon, 25 Jul 2011 14:07:11 -0400, Bill M wrote: Hi folks, I'm piecing together a small script to remove duplicate messages from various directories in Icedove. By default the files are stored in a directory called 'Local Folders' - with the space - and this seems to be creating a proble

Whitespace problem with bash script for Icedove

2011-07-25 Thread Bill M
Hi folks, I'm piecing together a small script to remove duplicate messages from various directories in Icedove. By default the files are stored in a directory called 'Local Folders' - with the space - and this seems to be creating a problem for bash. I can both cd to "Local Folders" and cd to