LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
Search this Thread
Old 09-17-2008, 08:14 AM   #1
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 579

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, 08:18 AM   #2
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

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

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


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


All times are GMT -5. The time now is 05:28 AM.

Main Menu
Advertisement
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