* date alias
@ 2002-06-07 3:25 pericles
2002-06-07 8:56 ` Steven Smith
2002-06-07 10:29 ` Suriya Narayanan M S
0 siblings, 2 replies; 3+ messages in thread
From: pericles @ 2002-06-07 3:25 UTC (permalink / raw)
To: linux-newbie
Steven, others,
I've added the following to /root/.profile
alias date='date +'%cEST''
and output is Thu Jun 06 13:33:14 2002EST
I have all the reference materials I need,
but don't know where to begin looking. I'd
like to include a space between the year
and time zone (2002 EST). Am I looking at
a kind of variable? What is the %c called
in the above alias? Am I looking for something
similar to %c?
Thanks, and best regards,
John E. Jay Maass, k7jkz
suburban Philadelphia
pericles@v35.com
http://jaywire.members.tripod.com
using Steven Darnold's BasicLinux Ver. 1.61
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: date alias
2002-06-07 3:25 date alias pericles
@ 2002-06-07 8:56 ` Steven Smith
2002-06-07 10:29 ` Suriya Narayanan M S
1 sibling, 0 replies; 3+ messages in thread
From: Steven Smith @ 2002-06-07 8:56 UTC (permalink / raw)
To: linux-newbie
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
> I've added the following to /root/.profile
>
> alias date='date +'%cEST''
>
> and output is Thu Jun 06 13:33:14 2002EST
I'm not quite sure what you're trying to achieve here. If
you just want the date in EST, then try:
export TZ=EST
date +%c
If you're root, you can set the system-wide timezone by
changing /etc/localtime (on my machine, this is a symbolic
link to a timezone file in /usr/share/zoneinfo). Then
anyone who doesn't have a TZ environment variable gets
that timezone.
> I have all the reference materials I need,
> but don't know where to begin looking. I'd
> like to include a space between the year
> and time zone (2002 EST).
Try:
alias date='date "+%c EST"'
> What is the %c called in the above alias?
Depending on who you ask, they're either directives or
output specifiers.
Steven Smith,
sos22@cam.ac.uk
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: date alias
2002-06-07 3:25 date alias pericles
2002-06-07 8:56 ` Steven Smith
@ 2002-06-07 10:29 ` Suriya Narayanan M S
1 sibling, 0 replies; 3+ messages in thread
From: Suriya Narayanan M S @ 2002-06-07 10:29 UTC (permalink / raw)
To: linux-newbie
On Thursday 01 January 1970 05:30, pericles@v35.com wrote:
> Steven, others,
>
> I've added the following to /root/.profile
>
> alias date='date +'%cEST''
>
> and output is Thu Jun 06 13:33:14 2002EST
>
> I have all the reference materials I need,
> but don't know where to begin looking. I'd
> like to include a space between the year
> and time zone (2002 EST). Am I looking at
> a kind of variable? What is the %c called
> in the above alias? Am I looking for something
> similar to %c?
$ man date
[snip]
%c locale's date and time (Sat Nov 04 12:02:33 EST 1989)
[snip]
$ date +"%c EST"
Fri 07 Jun 2002 03:58:20 PM IST EST
Bye,
Suriya Narayanan M S
--
Guru Brahma Gurur Vishnu
Gurur Dhevo Maheshwaraha
Gurur Saakshaath Parabramha
Thasmai Shree Gurave Namaha
Public key at www.keyserver.net
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-07 10:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-07 3:25 date alias pericles
2002-06-07 8:56 ` Steven Smith
2002-06-07 10:29 ` Suriya Narayanan M S
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox