Created
April 30, 2024 21:09
-
-
Save mhmdiaa/1c00bb828e80dd5906c874c2f77627c2 to your computer and use it in GitHub Desktop.
Copy responses from httpx's output to their original file names
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
cat urls.txt | httpx -json -store-response -output httpx.json | |
cat httpx.json | jq -r '"\(.stored_response_path) \(.path | ltrimstr("/"))"' | xargs -n 2 sh -c 'mkdir -p "$(dirname $2)" && cp $1 $2' sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment