Help in searching a multiple text in zip file

Hi Gurus,
i have 8 zipped files and each file is having more than 100,000 records or more.

issue :-

i want to search the missing text from each zipped files

i have stuck here, the below command works fine if i give the value 10 for the deptno.

if i have more than 1 records 20,30,40,50,60 to search in .gz file

Please share the solution for this

Thanks in advance

maybe you can try 'egrep'.

egrep 'text1|text2'

thanks dude,

actually i have tried in grep, but i have no luck on this.

now its working fine by giving the

can you please share the "file name" to be print too...

guess you will be using a script to iterate through unknown list of zipped files.

it is possible to use command in a loop with 'for'. for filename in $(ls /thePath/*.gz) ...

in this loop it is possible to assign result of a command to a variable. yourVar=$(gunzip -c $filename | egrep 'txt1|txt2')

now you can check if '$yourVar' is empty or not and echo filename and result of 'egrep'.

see the man zgrep ("1") command

Personally I don't understand this sentence.

Please post Expected Output to match your Sample Data.
If you only want to match on the Deptno field, the egrep (or if you have the command zegrep ) needs to be more specific or you will get accidental matches with other fields.

zegrep doesnt work in my Bash.. Can any one throw some light on getting it in my bash shell???

Please help, i have a similar kinda requiremant.

Thanks,
Mahi