#!/bin/sh printf "Content-Type: text/html\n\n" IFS='&' for arg in $QUERY_STRING; do case $arg in q=*) WORDS=`echo $arg | sed 's/q=//'` ;; esac done RETURN=$( find ../ -name "*.html" -not -path "../search/*" | while read i; do RESULTS=`grep "$WORDS" $i` if [ ! -z "$RESULTS" ]; then TITLE=`grep ".*" $i | sed 's/<[^>]*>//g' | sed 's/[ ]*//'` echo $i | sed -E 's/[\.\/]*(.*)/

'$TITLE'<\/h4><\/a>/g' echo "" fi done ) while read -r line; do if [ $line == '' ]; then if [ -z $RETURN ]; then echo "

Nessun risultato

" else echo $RETURN fi else echo $line fi done < index.html #grep -r "$WORDS" ../ --exclude-dir=search --exclude-dir=assets # | sed -E 's/รจ/\è/g' \ # | sed -E 's/<[^>]*>//g' \ # | sed -E 's/[\.\/]*([^:]*):[ ]*(.*)/\/\1:\2/g' \ # | sed -E 's/([^:]*):(.*)/
  • \2<\/a><\/li>/g'