The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-16-2008
saniya saniya is offline
Registered User
 

Join Date: May 2008
Posts: 5
how to extract files one by one from a directory and let some processing happen

how to extract files one by one from a directory and let some processing be done on the file

I have a directory by name INTRN which has files like

INTR.0003080248636814
INTR.0003080248636816
INTR.0003080248636818
.
.
.
.
and so on

and in a script i have a nawk block
nawk '{
.
.
.

}' <filename>

my problem is how to how to extract files one by one from a directory and place it at the end of the nawk block,like get the file
INTR.0003080248636814 from the directory INTRN and put it at the end of the nawk block for processing,aftr processing get the second file and do the same for all the files in the directory.
please help me.thanks in advance.
Reply With Quote
Forum Sponsor