Pol Hallen
Pol Hallen

Reputation: 1862

Hot to get exit code of wget ftp

I need to get exit code of ftp execution. My command line is:

wget -N ftp://server:pass@server/path/

Using:

if [ $? -ne 0 ]; then

will check wget execution.

Upvotes: 0

Views: 119

Answers (1)

Marco Rimoldi
Marco Rimoldi

Reputation: 193

not tested:

wget [wget options] 2>&1 | grep -i "failed\|error"

Upvotes: 1

Related Questions