Hi Gurus,
I am writing a script to automatically mget ( ftp ) files from a remote server to my local machine.
xfile="datafile_`date +%y%m`*"
in my FTP script, I'll just mget $xfile
The problem I am facing is ... I need to retrieve data files for DAY - 1.
I can get the DAY variable and then -1 from it but it requires a lot of logic when comes to month end.
Example :
mget datafile_030604*
Let's say, today is MARCH 1st. 01 is my day and I cannot be the day set to 0.
Just want to check with you guys any idea how I can simplify this task ?
Thanks a lot ...
I am writing a script to automatically mget ( ftp ) files from a remote server to my local machine.
xfile="datafile_`date +%y%m`*"
in my FTP script, I'll just mget $xfile
The problem I am facing is ... I need to retrieve data files for DAY - 1.
I can get the DAY variable and then -1 from it but it requires a lot of logic when comes to month end.
Example :
mget datafile_030604*
Let's say, today is MARCH 1st. 01 is my day and I cannot be the day set to 0.
Just want to check with you guys any idea how I can simplify this task ?
Thanks a lot ...