cnoocy: green a-e ligature (Default)
(boing!) Cnoocy Mosque O'Witz ([personal profile] cnoocy) wrote2004-01-09 04:17 pm
Entry tags:

Script to watch the approach of the binary gigasecond


#!/usr/bin/perl

use strict;

my $x = shift;
my $o = shift;
$o ||= ' ';
$x ||= '*';

while (1){
select (undef, undef, undef, 0.5);
my $t = `date +%s`;
my $s = sprintf "%b\n", $t;
$s =~ s/1/$x/g;
$s =~ s/0/$o/g;
print $s;
}


Run on a unix machine, pick one-character arguments if desired, pipe through uniq.
ETA: 08:37:04 on Saturday morning, Eastern Time.

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting