Skip to content

Instantly share code, notes, and snippets.

@RandomInsano
Last active January 14, 2017 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RandomInsano/bfbb5b82b8280dcc6e64 to your computer and use it in GitHub Desktop.
Save RandomInsano/bfbb5b82b8280dcc6e64 to your computer and use it in GitHub Desktop.
Simple scipt for backing up some floppies
#!/bin/bash
# usage: <drive path> <folder name>
#
# ex: copy.sh /dev/floppy0 "Where in the World is Carmen Sandeigo"
let a=0
echo "Creating directory for '$2'"
mkdir -p "$2"
while true;
do
let a=$a+1
echo
echo "About to clone disk $a"
echo "Press enter to start."
read
pv $1 > "$2/Disk $a.img"
if [ $? -ne 0 ]; then
let a=$a-1
fi
eject $1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment