LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-14-2003, 04:25 AM   #1
Leffe13
LQ Newbie
 
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Question about date


I want to display the date like this

Date: 14/10/03
Time: 11:24

I know that I can put the date on the screen by date +%D%n%T But how can I put the string on screen.

It's for a shell script

Thanks
 
Old 10-14-2003, 04:41 AM   #2
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
Howzit

Place that string under the /etc/bashrc file like this:

alias date='date +"DATE: %D%nTIME: %T "'

This will be used for all users on your box.

chow
 
  


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
A question regarding the date format marsques Linux - General 1 03-12-2005 05:28 PM
localtime / date question with openBSD lazlow69 *BSD 6 12-14-2004 07:50 PM
date command question lifetaster Programming 4 02-23-2004 07:05 PM
simple date script question Cynthia Blue Programming 3 01-13-2003 03:15 PM
Stupide Question about Date Format Corinne Linux - General 0 09-05-2001 04:47 AM


All times are GMT -5. The time now is 06:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration