Created
May 12, 2022 18:40
-
-
Save loplex/56ccb43e47b11fe2019999c6f0c8eea1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# pipe "file.har" to this script | |
jp "log.entries[*].response.content.text" | jq -c '.[]' | tr '\n' '\0' | xargs -0 -I '{}' sh -c 'echo -e {} $"\0"' | |
# If you want to write responses to separate files, pipe response of this script to | |
# |xargs -0 sh -c 'count=0; for fl in "$@"; do echo "$fl" > "fl$(printf "%03d" "$count")"; (( count++ )); done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment