basic searching

This commit is contained in:
lickthecheese 2020-03-18 19:34:29 -04:00
parent c5df2d871e
commit f251c397f4
2 changed files with 20 additions and 0 deletions

0
header.html Normal file
View File

20
index.cgi Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
echo "Content-Type: text/html"
echo
cat header.html
Q=$(echo "$QUERY_STRING" | sed -n 's/^.*q=\([^&]*\).*$/\1/p' | sed "s/%20/ /g" | sed "s/+/ /g")
if [[ $Q ]]
then
./tser $Q | cmark
[[ $(./tser $Q) ]] || echo "No results :("
fi