# HG changeset patch # User HackEso # Date 1574021871 0 # Node ID bbcac610574df09b77469eaa26083d273e87a069 # Parent 2826c0c87d929e57f5ed17b4055993eff86148bb fetch /hackenv/bin/uptime https://hack.esolangs.org/get/bin/uptime diff -r 2826c0c87d92 -r bbcac610574d bin/uptime --- a/bin/uptime Sun Nov 17 20:11:40 2019 +0000 +++ b/bin/uptime Sun Nov 17 20:17:51 2019 +0000 @@ -1,6 +1,6 @@ -#!/usr/bin/python3 +#!python3 boottime = 1245511822 -import sys, time +import sys, os, time helpmsg = "\nUsage:\n uptime [options]\n\nOptions:\n -p, --pretty show uptime in pretty format\n -h, --help display this help and exit\n -s, --since system up since\n -V, --version output version information and exit\n\nFor more details see uptime(1)." opt_p, opt_s = 0, 0 for a in sys.argv[1:]: @@ -13,7 +13,8 @@ elif "s" == c: opt_s = 1 elif "V" == c: - print("uptime from procps-ng 3.3.15") + os.execl("/usr/bin/uptime", "/usr/bin/uptime", "-V") + print("uptime from procps-ng 2.95.1") sys.exit(0) elif "h" == c: print(helpmsg, file = sys.stdout)