I use to go to a website http://testme.com/direct1/direct2/direct3/direct4/
to see latest file then do wget and untar it .
Where XXXXXXXX is number keep increase and I want to get the latest number link to download.
If the latest number is FN_29606118 ; then it will do
wget http://testme.com/direct1/direct2/direct3/direct4/FN_29606118.0_some_thing.tgz
tar -xvzf FN_29606118.0_some_thing.tgz
Can we do a shell script so we can do cronjob at 8am? How it can find what is latest or highest XXXXXXXXX number ?
I only can do this; but I have to check what is latest number
#!/bin/sh
LOC=`pwd`
mkdir $LOC/$1
if [ $# -eq 1 ] ; then
cd $LOC/$1
wget http://testme.com/direct1/direct2/direct3/direct4/FN_"$1".0_some_thing.tgz
tar -xvzf "$1".0_some_thing.tgz
fi
====
Can we do that ? Thanks .
to see latest file then do wget and untar it .
Where XXXXXXXX is number keep increase and I want to get the latest number link to download.
If the latest number is FN_29606118 ; then it will do
wget http://testme.com/direct1/direct2/direct3/direct4/FN_29606118.0_some_thing.tgz
tar -xvzf FN_29606118.0_some_thing.tgz
Can we do a shell script so we can do cronjob at 8am? How it can find what is latest or highest XXXXXXXXX number ?
I only can do this; but I have to check what is latest number
#!/bin/sh
LOC=`pwd`
mkdir $LOC/$1
if [ $# -eq 1 ] ; then
cd $LOC/$1
wget http://testme.com/direct1/direct2/direct3/direct4/FN_"$1".0_some_thing.tgz
tar -xvzf "$1".0_some_thing.tgz
fi
====
Can we do that ? Thanks .