Or so, if you dont trust the "&&" #!/bin/bash for pkgurl in $(cat pkg-url-list.txt); do wget $pkgurl ; code=$? echo $code if [ $code != 0 ] then echo "Couldn't retrieve file :(" ###break loop instead of exit 1 break fi done --Adrian
MARG said: > Hi, > > I'm doing this script (after my signature) that starts by downloading > files from the web. > It checks for each file if the download was successful. > > Is theres a fancier way to do the test, instead of repeating
- : send the line "unsubscribe linux-admin" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html