Thank you.. hiten.r.chauhan
But how to sort by time at for f in $file_name ## file_name=xyz*.dat
Thank you. Scrutinizer
My main loop is for, that get the physical file name and submit sqlldr and move the file to other locatoin. So how the two options suggested by you would help.
@Dharv you can probably use the lines that are currently in your while loop below the line where fname is being set (I used three dots there ... ). So your main loop would change from a for loop to a while loop. Otherwise you would need to show us more of your script..