M
M
Mouvdy2016-07-09 13:58:20
linux
Mouvdy, 2016-07-09 13:58:20

How to make wget and multiple grep variants?

Good afternoon,
There is a command on the tower:

wget -T 2 -t 1 --no-dns-cache --max-redirect=0 --spider customurl 2>&1 | grep 'application/zip'
        if [ $? = "0" ];
...

If the file exists, it starts downloading.
Is it possible to somehow specify grep 'application/zip' or grep 'application/x-gzip'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mamkaololosha, 2016-07-09
@Mouvdy

either split into 2 queries, or grep 'application/zip | application/x-gzip'

L
Leonid, 2016-07-09
@zzevaka

grep -E 'application/(xg)?zip'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question