From 3e559a8ecad2c03880c1105a729b69faaa2eb362 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Wed, 8 Jan 2020 19:56:11 +0000 Subject: improve presentation in searcg_cgi --- search_cgi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) mode change 100644 => 100755 search_cgi (limited to 'search_cgi') diff --git a/search_cgi b/search_cgi old mode 100644 new mode 100755 index 624ad2e..425ce55 --- a/search_cgi +++ b/search_cgi @@ -4,8 +4,10 @@ echo "Content-type: text/html\n\n" query="${QUERY_STRING}" - -echo "
Search for:
" +echo "" +echo "
Search for:
" echo "" echo "" echo "
" @@ -17,15 +19,17 @@ terms=$(echo "${query}" | tr '&' '\n' | grep -E "^query" | sed -E 's/^query=//') if [ -z "$terms" ]; then exit 0 else - search=$(echo "$terms" | sed -E 's/\%20/ /g') + search=$(echo "$terms" | sed -E 's/\+/ /g') res=$(./search_repo ./ $search ) if [ -z "$res" ]; then echo "

No results for \"$search\":" exit 0; else echo "

Results for \"$search\"" + echo "

" fi fi -- cgit v1.2.3