The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Reading Files oop UNIX for Dummies Questions & Answers 3 07-31-2007 04:40 AM
reading .bin files eastcoast_uix UNIX for Dummies Questions & Answers 1 06-26-2007 10:43 AM
reading gz files arushunter Shell Programming and Scripting 2 02-16-2007 02:29 PM
Reading *.chm files? riwa UNIX for Dummies Questions & Answers 3 04-02-2006 06:30 PM
Reading files on different platforms BigTool4u2 Linux 2 04-18-2004 02:47 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-12-2008
Registered User
 

Join Date: Apr 2008
Posts: 18
Reading Files In

I'm looking to write a script where i look in a file called files.txt. This file has a list of other files in there.

I want the script to be able to look at this files.txt and go off and find the files that are listed in another directory.

I am doing it this way as filenames change week in week out and I want to change files.txt and not have to go into the script in anyway.

any help would be appreciated.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-12-2008
joeyg's Avatar
premier etoile de match
 

Join Date: Dec 2007
Location: Home of world champion Boston Celtics
Posts: 535
Wink The basic outer loop would be something like

Code:
while read zf
  do
# command to do on file
  ls -l "$zf"
# more commands
#
done <files.txt
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:49 AM.


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