I am trying to zgrep multiple strings with the code below, but if I omit one of the parameters it spools a lot of un-matching files. If I enter all the 5 strings it works correctly. How can I zgrep any number of strings even if its just 3 of 5.echo Enter string 1: read isdn1echo Enter string 2: read isdn2echo Enter string 3: read isdn3echo Enter string 4: read isdn4echo Enter string 5: read isdn5for host in $(cat host.txt); do     ssh $host cd /onip/cdr/output/snapshot/normal/backup &&       zgrep '$isdn1\|$isdn2\|$isdn3\|$isdn4\|$isdn5' xyz_shot*done
How to zgrep multiple strings
linux;bash;shell script