27
May
2008
Shell script to extract isos from a folder
I had to do this repeatedly manually at work so it took me like 2 minutes to make my first script to do it for me. It was horribly messy and looked something this:
for x in $(ls -1 .); do
mount -t iso9660 -o loop $x temp/;
cp -r temp/* .;
umount temp/;
done;
Which did the job but was horribly messing on doing it more than once with tons of errors and stuff.
When I came home I decided to make it much better. I even included how long it takes to do the whole process, which was harder than the process itself.
Read the rest of this entry »