From owner-freebsd-questions@FreeBSD.ORG Fri Apr 16 09:25:06 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB11816A4CE for ; Fri, 16 Apr 2004 09:25:06 -0700 (PDT) Received: from mail.elvandar.org (cust.94.120.adsl.cistron.nl [195.64.94.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F2CC43D53 for ; Fri, 16 Apr 2004 09:25:06 -0700 (PDT) (envelope-from remko@elvandar.org) Message-ID: <408008E0.9080108@elvandar.org> Date: Fri, 16 Apr 2004 18:25:04 +0200 From: Remko Lodder X-Accept-Language: en-us, en MIME-Version: 1.0 To: Barbish3@adelphia.net References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at elvandar.org cc: "freebsd-questions@FreeBSD. ORG" Subject: Re: perl script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2004 16:25:06 -0000 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