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
find the length of file names in a directory? koti_rama Shell Programming and Scripting 5 06-04-2008 07:19 AM
Change All File Names in a Directory andou UNIX for Dummies Questions & Answers 8 01-22-2008 05:06 PM
Replace characters in all file names in a particular directory madhunk Shell Programming and Scripting 4 02-16-2006 03:10 PM
Column names in flat files srivsn Shell Programming and Scripting 1 12-27-2005 02:47 AM
File and Directory Names become hidden dbinsol1 UNIX for Advanced & Expert Users 10 05-29-2002 06:58 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-05-2005
Registered User
 

Join Date: Sep 2005
Posts: 38
directory names in a flat file

Hi,
Consider a flat file abc.conf contains some rows. Each row contains the directory name with full path. now I want to find a particular file in every directory which are mentioned in the abc.conf file. How it can be done through unix shell script.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-05-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,643
If you are searching for abc.txt.

Code:
while read dir
do
echo "Searching in $dir"
find "$dir" -name abc.txt
done < abc.conf
Not tested.
Reply With Quote
  #3 (permalink)  
Old 10-06-2005
Registered User
 

Join Date: Mar 2002
Location: singapore
Posts: 7
find `cat abc.conf` -name filename.ext
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:59 PM.


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

Content Relevant URLs by vBSEO 3.2.0