![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Small Search script | appu1987 | Shell Programming and Scripting | 2 | 06-03-2008 11:14 PM |
| Help with search script | bsandeep_80 | UNIX for Advanced & Expert Users | 9 | 09-06-2007 09:25 AM |
| Search File Script | I4ce | Shell Programming and Scripting | 7 | 03-28-2006 03:12 PM |
| Search script | BCarlson | Shell Programming and Scripting | 14 | 02-05-2006 02:50 AM |
| script to search all the directories | abk | Shell Programming and Scripting | 3 | 07-10-2002 01:19 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Log Search Script
Hi,
I am trying to write a script to search a log- IPaddress being the search criteria, I would ideally like the script to ask the ipaddress Enter IP address - 244.258.27.225 And the ideal result would be for the script to get all the entries in the log file for a particular IP address,
Thanks for your time |
|
||||
|
Code:
echo "enter IP address:\c" read ip grep $ip logfile Be aware that 244.258.27.225 has dots in it - there are some ways dots could change the search result because regular expressions use dots as a special character. If you run into problems check back here. |
|
|||||
|
Now, including this one, I see three of the same questions.
By rules, homework assistance is not allowed. Timestamp Search {How} Script to search a log file for a given criteria |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|