How to download file by using shell script (sh) ? How to use wget in shell sctipt to download a file ?






How to download file by using shell script (sh) ? How to use wget in shell sctipt to download a file ?


-----------------------------------------download_file.sh---------------------------------
#!/bin/sh

# directory path where you want to download the file
DIR=/data/test

# wget output file with this name
FILE="test_$(date +'%Y%m%d').xml"

# wget  file download url
URL="http"//www.xyz.com...... "

cd $DIR

#wgt syntax to download file

wget  $URL -O  $FILE


No comments:

Post a Comment

Fixing yum command on linux

You may find yourself having to fix more packages. So you can just remove everything you had installed via  pip and reinstall everythin...