![]() |
|
|
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 |
| shell script help: sorting, incrementing environment variables and stuff | secoif | Shell Programming and Scripting | 1 | 05-08-2008 08:04 AM |
| Sorting : | satyam_sat | Shell Programming and Scripting | 3 | 04-15-2008 01:30 PM |
| Sorting in C++.. | ronix007 | High Level Programming | 6 | 03-06-2008 05:16 PM |
| sorting in awk | mahabunta | Shell Programming and Scripting | 3 | 01-31-2007 01:56 AM |
| Sorting mp3 | penguin-friend | Shell Programming and Scripting | 3 | 05-13-2005 04:21 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Sorting in a script
Hello,
I have a situation where I have filenames with timestamps like abc20060509452313.txt i need the most recent file, and i am using this command in the script: recent_file=`ls ${Location}/$file*| head -1` where $Location is the directory and $file is the base filename like abc. When i debug it ,it says : the file /.../.../abc* doesnot exist. is there anything wrong with the quotes? Any help would be appreciated. Thank You, |
|
||||
|
Works for me on AIX (5.x) with ksh.
Are you sure that your Location (capital L) and file (all lower case) variables are spelt right and have got the right values? What command did you use to get the error message? cheers |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|