mirror of https://xfnw.ttm.sh/git/huntnw.git
12 lines
392 B
Bash
Executable File
12 lines
392 B
Bash
Executable File
#!/bin/bash
|
|
|
|
QUERY=`echo $1 | tr ' ' '|' | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g'`
|
|
|
|
|
|
for fn in `grep -rlEi $QUERY content`;do
|
|
PA=$fn
|
|
echo "<div class='box'><a href='"`head -n 2 $PA | tail -n 1`"'>"`head -n 1 $PA`"</a><p>"`grep -i $QUERY $PA | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g' | head -n 5`"</p></div>"
|
|
done
|
|
|
|
|