Gitiles
Code Review
Sign In
git01.mediatek.com
/
haproxy
/
078272e1152649f7b4d298a937b785f99fd717c2
/
.
/
examples
/
debugfind
blob: 88e97609afb97235c2c2ab6cc4a131c9a98c40b2 [
file
] [
log
] [
blame
]
#!/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