Skip to content

Instantly share code, notes, and snippets.

@jcahill
Created December 14, 2017 04:34
Show Gist options
  • Save jcahill/f224d7f618cda0bd2471bd5731c54d7e to your computer and use it in GitHub Desktop.
Save jcahill/f224d7f618cda0bd2471bd5731c54d7e to your computer and use it in GitHub Desktop.
parse data size from torrent file in bytes
head -1 example.torrent | grep -aoE '6:lengthi[0-9]+' | cut -di -f2 | awk '{s+=$1} END {print s}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment