The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-09-2008
amatuer_lee_3 amatuer_lee_3 is offline
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?
  #2 (permalink)  
Old 05-09-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
You want grep.

grep 'thing to find ' filename*
  #3 (permalink)  
Old 05-09-2008
amatuer_lee_3 amatuer_lee_3 is offline
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?
  #4 (permalink)  
Old 05-09-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
what does 'www.athabascu' have to do with months and years? Show some sample data inside the file
  #5 (permalink)  
Old 05-09-2008
amatuer_lee_3 amatuer_lee_3 is offline
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:17 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0