Skip to content

Instantly share code, notes, and snippets.

@atilaromero
Last active November 15, 2018 13:16
Show Gist options
  • Save atilaromero/a411858f8f30c4b396ddd51a16897d48 to your computer and use it in GitHub Desktop.
Save atilaromero/a411858f8f30c4b396ddd51a16897d48 to your computer and use it in GitHub Desktop.
mountmmls
mountmmls() {
mmls "${1}" | tail -n+7 | while read -ra i
do
[ ${i[1]} == ------- ] && continue
[ ${i[1]} == Meta ] && continue
echo mkdir -p vol${i[0]%:}
echo mount "${1}" vol${i[0]%:} -o ro,offset=$[${i[2]##+(0)} * 512],sizelimit=$[${i[4]##+(0)}*512]
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment