changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / rc/bin/uptime

changeset 7243: 34f64dcbbc25
parent: 512c2024f16a
author: cinap_lenrek@felloff.net
date: Fri, 17 May 2019 18:14:10 +0200
permissions: -rwxr-xr-x
description: 7l: don't hardcode 4k pagesize, use INITRND
1 #!/bin/awk -f
2 
3 BEGIN{
4  getline sysname < "/dev/sysname";
5 
6  getline < "/dev/time";
7  sec = sprintf("%d", $3/$4);
8 
9  ct = sprintf("%02d:%02d:%02d", sec%86400/3600, sec%86400%3600/60, sec%60);
10  printf("%s up %d days, %s\n", sysname, sec/86400, ct);
11 
12  exit
13 }