Skip to content

Instantly share code, notes, and snippets.

@2600box
Forked from jcahill/get torrent size
Created May 23, 2019 23:18
Show Gist options
  • Save 2600box/a87ee28170426791d5271ecbd5497813 to your computer and use it in GitHub Desktop.
Save 2600box/a87ee28170426791d5271ecbd5497813 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