LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 05-12-2004, 04:38 PM   #1
wijnands
Member
 
Registered: Mar 2004
Posts: 132

Rep: Reputation: 15
use date as output filename?


hi,

This should be a very easy one for most people and I have done this before, just can't recall how exactly.

What I want to do is run a script, pipe output to a file and use the date as (part of) the filename. Can anyone please remind me?
 
Old 05-12-2004, 04:39 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Try something like:
somecommand > myfile-`date +%F_%T`.txt
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
logrotate with date in filename ptp Linux - Newbie 1 04-14-2011 11:55 AM
adding date timestamp to filename markraem Solaris / OpenSolaris 2 11-17-2004 09:32 AM
put date as part of filename box_l Programming 3 07-27-2004 07:17 AM
Script add date to filename amphion Linux - Newbie 2 06-02-2004 08:12 AM
how to add date to filename x2000koh Programming 1 07-08-2003 10:44 PM


All times are GMT -5. The time now is 12:19 PM.

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