Hi
Is it possible to execute a zcat command into awk?, and then compare each (zcat file.Z) file with the "file_1" file?
file_1 , this file contains the data that I want to search into the information or registers of each file.Z. compressed file. The files compressed are related into the list_of_files_Z.
find -name "*.Z" -mtime .... > list_of_files_Z
awk ' BEGIN{
while( getline "file_1"){ field[1]=1}
while( getline "list_of_files_Z" ) { file[1]=1 }
for ( i in file){ # list_of_files.Z
while( "zcat file" | getline var )
split (var,k,";")
if ( k[1] in field )
print $field[k[1]]
}
}'
I want to read the file_1, then compare it with the data of (zcat files.Z) files. The files.Z are filtered with find command. Into de filesystem there are many files.Z files, but I only want to process the files that are between two dates. For example 2008-01-01 ... 2008-01-02.
Thanks malpa
Is it possible to execute a zcat command into awk?, and then compare each (zcat file.Z) file with the "file_1" file?
file_1 , this file contains the data that I want to search into the information or registers of each file.Z. compressed file. The files compressed are related into the list_of_files_Z.
find -name "*.Z" -mtime .... > list_of_files_Z
awk ' BEGIN{
while( getline "file_1"){ field[1]=1}
while( getline "list_of_files_Z" ) { file[1]=1 }
for ( i in file){ # list_of_files.Z
while( "zcat file" | getline var )
split (var,k,";")
if ( k[1] in field )
print $field[k[1]]
}
}'
I want to read the file_1, then compare it with the data of (zcat files.Z) files. The files.Z are filtered with find command. Into de filesystem there are many files.Z files, but I only want to process the files that are between two dates. For example 2008-01-01 ... 2008-01-02.
Thanks malpa