Skip to content

Instantly share code, notes, and snippets.

@itayd
Created February 8, 2011 11:22
Show Gist options
  • Save itayd/816288 to your computer and use it in GitHub Desktop.
Save itayd/816288 to your computer and use it in GitHub Desktop.
dd
#!/bin/bash
[[ $# -lt 2 ]] && echo "usage: `basename $0` src target" && exit 1
which bar >& /dev/null
(( $? )) && echo "bar required" && exit 1
dd if=$1 bs=1M | bar -s 4g | dd of=$2 bs=1M
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment