Mailinglist Archive: opensuse (3135 mails)

< Previous Next >
[opensuse] filtering
  • From: Vince Oliver <vince@xxxxxxxxxxxxxxx>
  • Date: Sat, 10 Mar 2007 00:37:22 +0100 (CET)
  • Message-id: <Pine.LNX.4.62.0703100032130.22187@xxxxxxxxxxxxxx>
Hi All,

I should take all "more*.dat" files from each "DH*" directory and to write out first 5 rows into "list" fajl. So each "DH*" directory should have "list" falj with 5 rows from all "more*.dat" within it. This command line works this job

for dir in DH* ; do
 for file in `find $dir -type f -name "more*data.dat" -print`; do
   awk 'BEGIN{FS=","}{if(NR>1 && NR<7){
   $6,$7,n>>f}}' $file

But I want would NOT like to have file names in "list" that contain words "t10" or "t9". How to filter them out in this context?

Thank you
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >