![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep latest file based on date. | lweegp | Shell Programming and Scripting | 12 | 04-03-2009 04:10 AM |
| Reading a file using sh with spaces in filename | jekl5 | Shell Programming and Scripting | 4 | 02-29-2008 10:18 AM |
| Loop through files in dir, omit file with latest date | stringzz | Shell Programming and Scripting | 2 | 12-04-2007 02:04 PM |
| Grabing Date from filename and adding to the end of each line in the file. | rkumar28 | Shell Programming and Scripting | 1 | 05-01-2007 09:25 PM |
| Copying files with the latest date | shashi_kiran_v | UNIX for Dummies Questions & Answers | 34 | 08-02-2005 01:07 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
get the latest file by reading the date in the filename.
Hi,
I grep for a pattern in a list of files. "grep -i -l $pattern *.datx*" it may give me n number of files. say for eg, it gives me 2 files. lock_eicu_20071228_00000000.dat_20071228_05343100 lock_eicu_20080501_00000000.dat_20080501_05343900 out of these 2 files I need to get the latest file according to the date present after the .dat extn. As 20071228 is older than 20080501, i need to get the second file. so in the above eg, i need to get the filename lock_eicu_20080501_00000000.dat_20080501_05343900 can u please help. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|