Gitiles
Code Review
Sign In
git01.mediatek.com
/
haproxy
/
f7089f5852e95329a6c3c6cdfa4213351cb35e89
/
.
/
examples
/
debugfind
blob: 88e97609afb97235c2c2ab6cc4a131c9a98c40b2 [
file
] [
log
] [
blame
]
willy tarreau
2f6ba65
2005-12-17 13:57:42 +0100
[
diff
] [
blame
]
1
#!/bin/bash
2
if
[
$
# -lt 2 ]; then
3
echo
"Usage: $0 regex debug_file > extracted_file"
4
exit
1
5
fi
6
word
=
$1
7
file
=
$2
8
exec grep $
(
for
i
in
$
(
grep $word $file
|
cut
-
f1
-
d
:
|
sort
-
u
)
;
do
echo
-
n
'\('
$i
':\)\|'
;
done
;
echo
'^$'
)
$file