On Thu, 6 Jan 2005 15:58:46 +1100 (EST) "Simon Bryan" <[EMAIL PROTECTED]> wrote:
> Hi all, > I am moving my users home directoires from one server to another and in > the process standardising usernames such that about 300 need changing. > Once I hav copied over the directories (cp -a) I will then need to rename > some of the directories. I have a csv file with the format > "oldname,newname" and a script to read it: > > #!/bin/bash > while read name1 name2; do > mv $name1 $name2 > # done < /home/OLMC/snap/rename.txt > > I have tested the script by changing the action to echo name1 echo name2 > and it worked fine. Can't test this easily without going live, whilst it Simon, I don't see how that could work. 1. the read will read the whole "oldname,newname" into $name1, since read doesn't understand commas 2. you've commented out the done! Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html