I need a shell script to download a tar file from a server daily and extract it to a specified folder. the problem i have is that the name of the file changes unregularly and i dont know how to get the name of the downloaded file as a value in my script to extract the file. does anyone have got an idea how to handle this?
heres some code:
FILE='*.tar' //there is only one tar-file
ftp -n $HOST <<END_SCRIPT
user $USER $PASSWD
tar xvf FILENAME <------ how can i get this in here
thanx a lot