Fred James wrote:
No, the extra quotes were to deal with the blank (space) in the file
names (example: "bar baz"), which was part of the original requirement
in the post from Patrick Wade. Without the extra quotes the command for
that file reads something like 'scp bar baz ...' instead of treating
"bar baz" as the file name (space included).
Regards
Fred James
What i eventually wound up doing:
# test for subscribed IMAP folders
if ssh [EMAIL PROTECTED] "ls ~$user/.mailboxlist 2>&1" > /dev/null
then boxen="$(ssh [EMAIL PROTECTED] "cat ~$user/.mailboxlist")"
IFS="
"
for b in ${boxen// /\\ } # transforms variable substitution
do scp "[EMAIL PROTECTED]:/home/$user/$b" /home/$user/mail
done
else echo "$user has no IMAP folders"
fi
This winds up substituting "bar baz" with "bar\ baz" in place of the
variable $b.
--
On two occasions I have been asked [by members of Parliament!], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question.
-- Charles Babbage
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug