View Single Post
Old Apr 26th, 2005, 2:38 PM   #3
technett
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 technett is on a distinguished road
THank you for your help.
I have gotten my script to look like this:

#!/bin/bash
cd /home
for user in `ls`
do
cd "$user"/mail
for dir in `ls`
do
echo mail/"$dir" >> /home/"$user"/.mailboxlist
done
cd /home
done

However, after running this script, I found that it script doesn't allow for spaces in names.
For instance, if there was a file named "2005 report", the script sees it as "2005" and "report" as two separate files.
How can I modify it to allow spaces or change the spaces to underscores?

Thanks,
Nett
technett is offline   Reply With Quote