Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Apr 2004 18:25:04 +0200
From:      Remko Lodder <remko@elvandar.org>
To:        Barbish3@adelphia.net
Cc:        "freebsd-questions@FreeBSD. ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: perl script help
Message-ID:  <408008E0.9080108@elvandar.org>
In-Reply-To: <MIEPLLIBMLEEABPDBIEGAEBCFMAA.Barbish3@adelphia.net>
References:  <MIEPLLIBMLEEABPDBIEGAEBCFMAA.Barbish3@adelphia.net>

next in thread | previous in thread | raw e-mail | index | archive | help
JJB wrote:
> I need $timezone to hold the time zone in this format  -00:00
> The command  date +%z  will give it as  -0000
> 
> I know nothing about writing perl scripts.
> 
> Can somebody show me how to  add the : in the output 
> of the date command in the simple following script?
> 
> The cat statement is just so I can see results are correct.
> 
> 
> #!/usr/bin/perl
> $timezone=date +%z;
> cat $timezone
> 

Not that i am very good in perl,
In KSH scripting it's like this:

%H:%M for a 00:00 output instead of 0000

Perhaps that will help you:-)

(Oh the command date +%H:%M)

Cheers

> 
> 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


-- 

Kind regards,

Remko Lodder
Elvandar.org/DSINet.org
www.mostly-harmless.nl A Dutch community for helping newcomers on the 
hackerscene



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?408008E0.9080108>