Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cron and wget

Status
Not open for further replies.

panpol

Programmer
Oct 25, 2005
7
CY
Hi all

I am trying to create a daily script which is getting every day at 11pm the index file of a website with wget, and is placing that file to my own web-server .

When I run the script as follow, everything working

./the-name-of-the-script

But, every time that I live to crone to make the job at a specific time, nothing is working, and I believe the problem is the ‘wget’

The first 10 lines of the script:

rm /var/
wget
grep -n "newstable" /etc/cron.daily/index.html > /var/index2.html
awk ' { print $1 } ' /var/index2.html > /var/index3.html
sed 's/:.*//' /var/index3.html > /var/alllines.txt

awk ' { lines[NR] = $0 } END { for (i=1; i<=NR; i++) { if (i!=1){if (i<4) { print lines} } } } ' /var/ > /var/
…….

Can anyone help?
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top