Grep on zip file problem

view full story

http://www.unix.com – Hi All, I'm stuck with this issue when I try to display the searched string into a compressed file. More exactly when I run this script Code: for f1 in $(find dir1 -type f -print); do  gunzip -c $f1 | grep -n "gio" | awk -F":" '{print $1-1 "," $1 "p"}'  | xargs -i sed -n {} $f1 ; done returns Code: T Š A1 T £ A ΀y£`à but if I run Code: gunzip -c <file name> | grep -n "gio" this work fine Code: <file name> = *.Z  *.gz Any suggestion will be well appreciated. Thanks in a (HowTos)