I need to read in a file 

I have a file that contains a list of file name prefixes and a directory of expanded 
file names as shown here.

I need to read the prefix_list.txt and for each prefix, list Only the relevant files 
from the samples directory.

For example: For the prefix : y022inv, the script should return the following list:

y022invha0.txt y022invhb0.txt y022invhc0.txt.

 

What would be the way to do this ?  

Thanks

A!

 

prefix_list.txt

==========

y022inv

y022mak

y022lan

 

The files in the Samples directory 

% ls samples

y022invha0.txt

y022invhb0.txt

y022invhc0.txt

y022makha0.txt

y022makhb0.txt

y022makhc0.txt

y022lanha0.txt

y022lanhc0.txt

 



---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

Reply via email to