LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2004, 05:10 PM   #1
Rv5
Member
 
Registered: Sep 2003
Distribution: RedHat9
Posts: 114

Rep: Reputation: 15
CAT and DATE


is there a simple way to use cat and date together? all im trying to do right now is create a file, called curdate or something, and just put the contents of the date output in that file. tried a couple different things and nothing is working so far. seems like a simple enough thing to do though. any ideas?

edit*
think i found a way
i just do:
date > curdate
and then to append the current date into a larger file using cat

Last edited by Rv5; 09-11-2004 at 05:18 PM.
 
Old 09-11-2004, 05:15 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
date works like :

date "+%A %d %B %Y %T" > curdate
date "+%d-%m-%Y" > curdate

man date for more infos
 
Old 09-11-2004, 05:19 PM   #3
Rv5
Member
 
Registered: Sep 2003
Distribution: RedHat9
Posts: 114

Original Poster
Rep: Reputation: 15
yeah i just found about about using the > sign. had to go to the net to find it. not really explained like that in any of my books
 
Old 09-11-2004, 05:24 PM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
try man bash so
 
  


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
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM
My Cat unimaginative General 71 02-18-2004 01:08 PM
Cat ... Beuzekom Linux - Newbie 4 01-19-2004 05:32 PM
lastlog date does not match system date? jcmj Linux - Networking 6 10-22-2002 12:09 PM
regarding cat gui10 Linux - Security 6 12-07-2001 08:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:03 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
Open Source Consulting | Domain Registration