The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compare date from db2 table to yesterday's Unix system date sasaliasim Shell Programming and Scripting 9 12-01-2008 11:37 PM
Adding a date as a first column figaro UNIX for Dummies Questions & Answers 2 05-21-2008 06:00 PM
awk system date with -d option arag0rn Shell Programming and Scripting 3 01-05-2008 03:23 PM
system date Prafulla UNIX for Dummies Questions & Answers 1 02-01-2002 06:42 AM
file date vs. system date ober5861 UNIX for Dummies Questions & Answers 8 09-11-2001 03:36 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-15-2008
gmahesh2k gmahesh2k is offline
Registered User
  
 

Join Date: May 2008
Posts: 8
System date to a column

Hello,

I would like to write a scrip which gives System Date for a column, is there any function I can use to print the System date.

Thanks in Advance

Regards,
Mahesh
  #2 (permalink)  
Old 05-15-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
I might be misunderstanding your question but what's wrong with 'date'?
  #3 (permalink)  
Old 05-15-2008
gmahesh2k gmahesh2k is offline
Registered User
  
 

Join Date: May 2008
Posts: 8
current date

I would like to echo the System date and time and print it whenever I run the script so that I have a record of the script run date

Thanks and regards,
Mahesh
  #4 (permalink)  
Old 05-15-2008
Wolja's Avatar
Wolja Wolja is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 15
Quote:
Originally Posted by gmahesh2k View Post
I would like to echo the System date and time and print it whenever I run the script so that I have a record of the script run date

Thanks and regards,
Mahesh
Assuming I understand this you want something like
date data

data=something

echo "`date +%d%m%Y`{Separator}$data" >> file

cat file
16052008{Separator}something

Last edited by Wolja; 05-15-2008 at 09:31 PM.. Reason: completing post
  #5 (permalink)  
Old 05-19-2008
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 500
Suggestively, you may want to change `date +%d%m%Y` to `date +%Y%m%d`.

[/my-two-cents]
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0