LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   pause search script (https://www.linuxquestions.org/questions/linux-software-2/pause-search-script-448629/)

paul_mat 05-25-2006 10:15 PM

pause search script
 
hi there,

I've writtern a short script for searching though my DG blacklists

#!/bin/bash
Z=search
echo "Enter the domain name you want to search for:"
printf "Search"
read Z
if [ "$Z" = "" ]; then
Z=search
fi
echo ""

grep -r $Z /etc/dansguardian/blacklists/*

but the problem is sometimes this can bring back a huge result. I was wondering if someone knew of a way I could get it to display like 30 lines at a time?

cs-cam 05-25-2006 11:50 PM

Pipe the output to less?

debulu 05-25-2006 11:50 PM

hi
If I have understood your point correctly than i would suggest to use more to display it in a screen feeted way.

grep -r $Z /etc/dansguardian/blacklists/* | more


see man page of "more" for more options.

hope helps.

paul_mat 05-25-2006 11:56 PM

thanks, debulu that did the trick!

#!/bin/bash
Z=search
echo "Enter the domain name you want to search for:"
printf "Search"
read Z
if [ "$Z" = "" ]; then
Z=search
fi
echo ""

grep -r $Z /etc/dansguardian/blacklists/* | more


All times are GMT -5. The time now is 05:29 AM.