The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
getting the most recent file
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
getting the most recent file
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
06-22-2006
vgersh99
Moderator
Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
Code:
ls -1 * |
sed
's/^[^0-9][^0-9]*\([0-9][0-9]*\).*/\1 &/' | sort -n | cut -d ' ' -f2- | tail -1
Last edited by vgersh99; 06-22-2006 at
04:03 PM
..
vgersh99
View Public Profile
Find all posts by vgersh99
Find vgersh99's past nominations received
Find vgersh99's present nominations given