![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sort files by date | itik | Linux | 1 | 06-02-2008 06:25 PM |
| Sort all files in a directory retaining originals | ledgie | UNIX for Dummies Questions & Answers | 4 | 03-19-2008 10:12 AM |
| Loop through files in dir, omit file with latest date | stringzz | Shell Programming and Scripting | 2 | 12-04-2007 02:04 PM |
| Sort files by Date-timestamps available in filename & pick the sortedfiles one by one | Chindhu | Shell Programming and Scripting | 4 | 08-10-2007 07:54 AM |
| Loop through files in a directory | rladda | Shell Programming and Scripting | 4 | 06-24-2005 05:30 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
loop through the directory for files and sort by date and process the first file
hello
i have a requirement where i have a direcotry in which i get files in the format STOCKS.20080114.dat STOCKS.20080115.dat STOCKS.20080117.dat STOCKS.20080118.dat i need to loop through the directory and sort by create date descending order and i need to process the first file. can any body throw some light on it. appreciate your help nag |
|
||||
|
hi,
try this as a first step #!/bin/ksh for $f in `ls -lt` do done Regards, Alan Mehio UK, London |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|