Skip to content

Instantly share code, notes, and snippets.

@tsykoduk
Created December 13, 2011 22:08
Show Gist options
  • Save tsykoduk/1474131 to your computer and use it in GitHub Desktop.
Save tsykoduk/1474131 to your computer and use it in GitHub Desktop.
pull GET urls out of an apache log file
#!/usr/bin/env bash
# Use this script to pull just the POST URLs out of an apache log file
# Useful to replay traffic against test servers
cat $1 | tr -d - | cut -d\" -f2 | sed 's/GET //' | sed 's/ HTTP\/1.1//' | grep -v "POST" | grep -v '^$' >list.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment