Created
January 4, 2010 05:26
-
-
Save lsparrish/268323 to your computer and use it in GitHub Desktop.
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
export OFFSET=4967232 | |
alias extract="dd if=retroImage of=blocks.blk skip=$OFFSET ibs=4" | |
alias inject="dd if=blocks.blk of=retroImage ibs=4 bs=4 seek=$OFFSET" | |
alias text="tr -d '\000' < blocks.blk > blocks.txt" | |
alias block="sed -e 's/\(.\)/\1\x00\x00\x00/g' < blocks.txt > blocks.blk" | |
alias readable="fold -w 64 blocks.txt > readable.txt" | |
alias writable="tr -d '\012' < readable.txt > blocks.txt" | |
alias get='extract; text; readable' | |
alias put='writable; block; inject' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment