You should cut & paste that - there are spaces after the "+" and after the "%d" that are important. ;-)
Main Topics
Browse All TopicsI have a text file that looks like this:
-rw-r--r-- 1 10110 105 5601 Sep 09 08:04 20090908.txt
-rw-r--r-- 1 10110 105 62640 Sep 09 21:00 44734868.pdf
-rw-r--r-- 1 10110 105 78639 Sep 09 21:15 44801530.pdf
drwxrwsr-x 2 10110 105 24576 Sep 10 08:05 .
-rw-r--r-- 1 10110 105 5082 Sep 10 08:05 20090909.txt
I need to be able to query this file and get the name of any .txt file that has today's date on it. So on September 10th, I need to be able to run this script and the only output will be 20090909.txt which has a file modification date of Sep 10. Any ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
$ grep "`date '+ %b %d '`" ucclist.txt | awk '{print $9}'
$
When I run that, I do not get any results where ucclist.txt is the name of the .txt file.
$ tail ucclist.txt
-rw-r--r-- 1 10110 105 79427 Sep 09 21:16 44802510.pdf
-rw-r--r-- 1 10110 105 129628 Sep 09 22:10 44920371.pdf
drwxrwsr-x 2 10110 105 24576 Sep 10 08:05 .
-rw-r--r-- 1 10110 105 5082 Sep 10 08:05 20090909.txt
Business Accounts
Answer for Membership
by: nemws1Posted on 2009-09-11 at 07:18:09ID: 25309738
Try this:
Select allOpen in new window