Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Simple Bash script to mount a floppy image and extract its contents.
- # Requires a Linux (probably) host with capability of mounting loopback filesystems.
- # Useful if you want to archive floppy disks in batches.
- # if 'mounted' directory doesn't exist, create it
- [ ! -d mounted ] && mkdir mounted
- for image in *.img
- do
- echo "--> Starting processing of $image"
- imgname=`basename $image .img`
- echo "--> Image basename is $imgname"
- mkdir $imgname
- mount -t msdos -o loop $image mounted/
- cp -ar mounted/* $imgname
- umount mounted/
- echo "--> Completed processing of $image"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement