Gentoo Archives: gentoo-user

From: Jorge Almeida <jalmeida@××××××××××××.pt>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] date in emerge logs
Date: Fri, 27 Oct 2006 23:41:17
Message-Id: Pine.LNX.4.64.0610280032020.21181@jmaa.math.ist.utl.pt
In Reply to: Re: [gentoo-user] date in emerge logs by Peter Ruskin
1 On Fri, 27 Oct 2006, Peter Ruskin wrote:
2 >> Would you say that using date is faster/lighter than awk (as per
3 >> other replies)? This is to be included in a script, so the
4 >> lighter the better...
5 > I would think so, yes. If you write a script like this...
6 >
7 > #!/bin/sh
8 > # unix-time
9 > date -d @$1
10 >
11 > ...and enter:
12 > $ unix-time 1161911504
13 > Fri Oct 27 02:11:44 BST 2006
14 >
15 Thanks, but that's not what I meant. I have a script that acts as a
16 filter, and sometimes lines include unix-time dates. So I suppose that
17 awk it is, since "date" will choke on input other than proper dates.
18
19 Cheers.
20 --
21 Jorge Almeida
22 --
23 gentoo-user@g.o mailing list