Skip to content

Instantly share code, notes, and snippets.

@v6ak
Created May 1, 2012 15:30
Show Gist options
  • Select an option

  • Save v6ak/2568859 to your computer and use it in GitHub Desktop.

Select an option

Save v6ak/2568859 to your computer and use it in GitHub Desktop.
remote sha1sum for box.com
for url in $(
curl https://www.box.com/api/2.0/folders/$FOLDER_ID -H "$AUTH" |
(sed 's#.*"entries":\[{##' | sed 's/},{/\n/g') | grep file | sed 's#^"type":"file","id":"\([0-9]\+\)".*#https://www.box.com/api/2.0/files/\1#'
); do
curl "$url" -H "$AUTH" | sed 's#\(.*\)"name":"\([^"]\+\)",\(.*\)"sha1":"\([^"]\+\)"\(.*\)$#\4 \2\n#'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment