mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-28 15:42:30 +00:00
9 lines
229 B
Plaintext
9 lines
229 B
Plaintext
|
#!/bin/bash
|
||
|
if [ $# -lt 2 ]; then
|
||
|
echo "Usage: $0 regex debug_file > extracted_file"
|
||
|
exit 1
|
||
|
fi
|
||
|
word=$1
|
||
|
file=$2
|
||
|
exec grep $(for i in $(grep $word $file |cut -f1 -d: | sort -u ) ; do echo -n '\('$i':\)\|'; done; echo '^$') $file
|