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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk script, find pattern lulle UNIX for Advanced & Expert Users 3 06-04-2008 04:20 AM
HELP! PERL script to find matched pattern kimhuat Shell Programming and Scripting 1 05-12-2008 11:24 AM
Script to find file name for non matching pattern sujoy101 Shell Programming and Scripting 5 03-31-2008 10:10 AM
Script to find files on a given input date ar.karan Shell Programming and Scripting 1 08-13-2007 11:07 PM
find and replace a pattern in a file krishnamaraju Shell Programming and Scripting 1 08-29-2006 11:02 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-06-2006
iguanathompson iguanathompson is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 5
Smile Find script with input pattern file

Howdy:
I have a file with 140+ file name patterns. Each prefix can have dozens of files with different extension names.
e.g.
1-S51
1113-G6V
1117-G6V
1119-G6V
1127-G6V
12XW-AF5W
14-UA8N

I need to search in 12 directories, (/data/lgc1/basin_mas to /data/lgc12/basin_mas) for all the files.
The output (e.g. 1-S51___oan160001.1c1_fkd) has to be directed to a file, that lists the creator and the directory it is residing in.

I tried to use find /data/lcg*/basin_mas -name "1-S51*" -exec ls -lart {} \; 2>/dev/null >1.x
in a script (140+ lines long) with plans to cat all the *.x files together.
The script would only find some of the files. Most of the *.x files had a size of zero.
Yet, all 140+ files have at least 1 file on the system.

Can anyone suggest improvements to the script?
Or a script that would read in the prefixes, create a command and output the info?

Thanks.
 

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 06:24 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