Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Und3rf10w/cc1dd81ea67632240fba94fd5be1a249 to your computer and use it in GitHub Desktop.
Save Und3rf10w/cc1dd81ea67632240fba94fd5be1a249 to your computer and use it in GitHub Desktop.
Extracts the contentBytes from a Microsoft Graph (o365) response and writes them to raw files using jq
for line in `cat response.json| jq '.value[].contentBytes'`; do
echo $line | tr -d '"' | base64 -d > $(echo -n $line | cut -c2-5).file;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment