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
Traverse a flatfile and check for errors aravindc Shell Programming and Scripting 1 04-17-2008 02:56 AM
Using File Descriptors, traverse a list MaestroRage UNIX for Dummies Questions & Answers 2 02-12-2008 07:05 PM
Traverse Directory Tree for backup srmadab Shell Programming and Scripting 1 09-11-2006 06:16 PM
Fastest way to traverse through large directories sreedharange UNIX for Dummies Questions & Answers 5 12-21-2005 11:27 PM

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 08-30-2007
baghera baghera is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
Traverse catalogs

Here is my problem (it seems I've a lot of problems nowadays).

I have several folders:

runner.20070830.12.45.12
runner.20070830.12.45.15
runner.20070830.12.45.17
runner.20070830.12.45.20
runner.20070830.12.45.45
runner.20070830.12.45.55

Each catalog contains some html-files.

I need to traverse each folder and get some data from a special html-log file in each folder. How can this be done in a simple way?
  #2 (permalink)  
Old 08-30-2007
rexf rexf is offline
Registered User
  
 

Join Date: Aug 2007
Location: 127.0.0.1
Posts: 13
This may help if you have access to perl:
Perl 5.8 Documentation - File::Find - Traverse a directory tree
  #3 (permalink)  
Old 08-30-2007
baghera baghera is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
Quote:
Originally Posted by rexf View Post
This may help if you have access to perl:
Perl 5.8 Documentation - File::Find - Traverse a directory tree
But this seems to be for perl? I need something for bash. Also the number of directories will vary so I need the script to search through every folder in speciefied folder.
  #4 (permalink)  
Old 08-30-2007
baghera baghera is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
Problem solved:

cat *folder*/file.html | grep "hola"

*folder* is a name that all the folders have incommon and then I use grep the get the line containing to numbers.


Cheers
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 05:20 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