LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 09-17-2008, 07:14 AM   #1
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 576

Rep: Reputation: 30
call a file dated yesterday


Hi,

I used to run a script , which output is piped to myscript.log_$(date +\%F).
The log file is created in the form of myscript.log_2008-09-15. Now , say today is 2008-09-16. I want to call the file myscript.log_2008-09-16 using a command. How can I do it?

Thanks
 
Old 09-17-2008, 07:18 AM   #2
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,846

Rep: Reputation: 128Reputation: 128
Code:
date -d yesterday +\%F
 
Old 09-17-2008, 07:34 AM   #3
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 576

Original Poster
Rep: Reputation: 30
Thanks

Its Working
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
save info in dated files va1damar Linux - Newbie 1 10-30-2006 11:50 AM
Automated FTP script to grab ONLY newest dated files kaiserbeto Linux - Newbie 4 10-20-2006 02:46 AM
script for display a clock from dated images osio Programming 0 01-14-2006 10:38 AM
Dated 486 Laptop + Linux nemo3383 Linux - Laptop and Netbook 5 03-29-2004 11:33 PM
Why are all IPTables guides out-dated? Can this be done..? Grim Reaper Linux - Networking 1 01-25-2003 07:17 AM


All times are GMT -5. The time now is 02:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration