Code: Select all
wget -FO index.html -P $TMP $URL ; ERR=$?
The wget help section:
Code: Select all
-P, --directory-prefix=PREFIX save files to PREFIX/...
Code: Select all
wget -FO index.html --directory-prefix=$TMP $URL
### SOLVED: I used the path and file together and it works...
Code: Select all
wget -FO $TMP/index.html $URL ; ERR=$?