Hi folks,
In my application there is a job running which create a .dat file along with it zip file also at unix box location /opt/app/cvf/temp1
so in temp1 directory I have one .dat file and its zip file also.
Now since this job runs every day so if a job runs today there will be two files one is .dat file and other is it's .zip file and let say next day job also runs so what it does is that it keep the previous day .zip file but it delete the .dat file of previous day instead and it creates the new .dat file of present day, so total will be there 3 files for that day , one previous day .zip file and one present day .zip file and one present day.dat file. and so on cycle contionus , so finally I have one .dat file only and remaning previos zip files at temp1 directory
Now my objective is to move the .zip file of the latest one to the other location at /opt/app/cvf/temp2 , please advise the script that will move the latest .zip file to the temp2 directory.
I am using bash shell in unix.