blob: 88e97609afb97235c2c2ab6cc4a131c9a98c40b2 [file] [log] [blame]
willy tarreau2f6ba652005-12-17 13:57:42 +01001#!/bin/bash
2if [ $# -lt 2 ]; then
3 echo "Usage: $0 regex debug_file > extracted_file"
4 exit 1
5fi
6word=$1
7file=$2
8exec grep $(for i in $(grep $word $file |cut -f1 -d: | sort -u ) ; do echo -n '\('$i':\)\|'; done; echo '^$') $file