Quote:
Originally Posted by ghostdog74
show your code, error outputs and whatever info that's will help us to help you.
The code I am trying is :
cat myfile | awk '{print $1, $2}' | while read var1 var2
do
zcat $var2* | grep "^000$var1" >> my_output
done
where myfile contains data like :
1231231 01
1451515 02
I just want to replace the var2 i.e. 01 with the zip files (.Z files) starting with 01.abcdfef
01.hjjjkjhjh and so on and then grep the var1 from these files.
Error I am getting is :
*.Z : No such file or directory.
*.Z : No such file or directory.
*.Z : No such file or directory.
*.Z : No such file or directory.
.
.
.
.
I am not getting how to substitute the file names read as var2 of myfile. Please help...