The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Test command JWilliams AIX 2 12-03-2007 10:53 PM
test command looks strange... jjinno Shell Programming and Scripting 2 11-02-2007 03:31 PM
the TEST command marwan UNIX for Dummies Questions & Answers 2 04-23-2007 03:51 PM
test command is not working zam Shell Programming and Scripting 2 07-04-2006 06:42 PM
Linux test command pvar Linux 4 07-15-2004 03:23 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-09-2008
Registered User
 

Join Date: May 2008
Posts: 53
TEST command

I have been looking into searching various files to display output.

The search criteria will be a month and year to output various numbers in the files.

is there any way to do this with the TEST function or would it have to be another way?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-09-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,861
You want grep.

grep 'thing to find ' filename*
Reply With Quote
  #3 (permalink)  
Old 05-09-2008
Registered User
 

Join Date: May 2008
Posts: 53
thanks.

would this be along the lines of the right thing do you think?

Quote:
find . -exec grep -q "www.athabascau" '{ }' \; -print
basically i want to find months and years across numerous files and display them as output.

if i change the "www.athabascau" bit to the filename will it work?
Reply With Quote
  #4 (permalink)  
Old 05-09-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,861
what does 'www.athabascu' have to do with months and years? Show some sample data inside the file
Reply With Quote
  #5 (permalink)  
Old 05-09-2008
Registered User
 

Join Date: May 2008
Posts: 53
sample date inside the file is:

IP Address - Day -Month - date -Time - Yr


I need to be able to do the search using month and year to output the rows from across multiple hits files.

the www. bit was just from an example i had. sorry i forgot to delete it.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0