LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-25-2006, 10:15 PM   #1
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
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?
 
Old 05-25-2006, 11:50 PM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Pipe the output to less?
 
Old 05-25-2006, 11:50 PM   #3
debulu
Member
 
Registered: May 2006
Location: India
Distribution: Redhat
Posts: 49

Rep: Reputation: 15
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.
 
Old 05-25-2006, 11:56 PM   #4
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Original Poster
Rep: Reputation: 30
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Play/Pause Script for MPD drj000 Programming 3 02-15-2013 02:44 AM
search function (bash script) LYK Programming 2 05-27-2004 10:51 AM
Eggdrop script search iceman47 Linux - Software 2 10-07-2003 03:59 AM
Search for a file using shell script sharathkv Linux - Newbie 2 08-06-2003 05:05 AM
Website search script itloser Linux - Newbie 0 02-21-2003 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration