On Fri, 27 Oct 2006, Peter Ruskin wrote:
Would you say that using date is faster/lighter than awk (as per
other replies)? This is to be included in a script, so the
lighter the better...
I would think so, yes.  If you write a script like this...

#!/bin/sh
# unix-time
date -d @$1

...and enter:
$ unix-time 1161911504
Fri Oct 27 02:11:44 BST 2006

Thanks, but that's not what I meant. I have a script that acts as a
filter, and sometimes lines include unix-time dates. So I suppose that
awk it is, since "date" will choke on input other than proper dates.

Cheers.
--
Jorge Almeida
--
[email protected] mailing list

Reply via email to