Script help

Cameron Simpson cs at zip.com.au
Sat Sep 20 00:41:37 UTC 2008


On 20Sep2008 10:36, I wrote:
| Something like the find incantation of another post is the easy way:
| 
|   find . -type f -name 'myfile\*.txt' | ls -t | sed 1q

Gah. My brain is off. Something more like this:

  files=`find . -type f -name 'myfile\*.txt'`
  ls -t -- $files | sed 1q

Won't work if there are spaces in the filenames...
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

These are my principles, and if you don't like them, I have others.
        - Groucho Marx




More information about the fedora-list mailing list