Created
May 8, 2012 20:49
-
-
Save brunosan/2639157 to your computer and use it in GitHub Desktop.
Say you need to put some files on 100 USB sticks...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in {1..999} | |
do | |
echo "Waiting for some love" | |
while [ ! -s /Volumes/USB\ DISK/ ] | |
do | |
sleep 0.5 | |
printf "." | |
done | |
echo $i | |
echo "Making new friends!" | |
sleep 0.5 | |
cp -vr ~/Desktop/tocopy/* /Volumes/USB\ DISK | |
diskutil rename /Volumes/USB\ DISK GAIN | |
diskutil unmount /Volumes/GAIN | |
printf "hu yeah!" | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Only work for OSX. Just copy, make it executable and run.
Then you only need to plug it, and wait for it to ask for the next one.