[K12OSN] Scripters...I need your help! *please?*

David Trask dtrask at vcs.u52.k12.me.us
Fri Nov 19 17:15:19 UTC 2004


Thanks so much for your help....I tweaked it a little to meet my needs,
but I know several folks made suggestions after Petre posted his
script....below is what I have thus far and it works, but I'm interested
in making it the best it can be....if you see something can you make the
change where it goes and repost?  Thanks!  It's below.....


!#/bin/bash
for x in `ls /home`; do
echo "Doing $x ..."
mkdir /home/${x}/win-backup
chown ${x}.Users /home/${x}/win-backup

echo "Copying /opt/samba/profiles/${x}/My\ Documents/
/home/${x}/win-backup"
cp -Rf  /opt/samba/profiles/${x}/My\ Documents/ /home/${x}/win-backup

echo "Copying /opt/samba/profiles/${x}/Desktop/ /home/${x}/win-backup"
cp -Rf /opt/samba/profiles/${x}/Desktop/ /home/${x}/win-backup

echo "Copying /opt/samba/profiles/${x}/Favorites/ /home/${x}/win-backup"
cp -Rf /opt/samba/profiles/${x}/Favorites/ /home/${x}/win-backup

chown -R ${x}.Users /home/${x}/win-backup

done


PS...where's the best place to get some tutorials or references so I can
get better at scripting like this?




David N. Trask
Technology Teacher/Coordinator
Vassalboro Community School
dtrask at vcs.u52.k12.me.us
(207)923-3100




More information about the K12OSN mailing list