Mercurial > repo
comparison bin/uptime @ 12143:f35125e00403 draft
<b_jonas> fetch /hackenv/bin/uptime https://hack.esolangs.org/get/bin/uptime
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Sun, 17 Nov 2019 20:30:42 +0000 |
parents | ec79f376cd1a |
children |
comparison
equal
deleted
inserted
replaced
12142:ec79f376cd1a | 12143:f35125e00403 |
---|---|
1 #!/usr/bin/python3 | 1 #!/usr/bin/python3 |
2 # (/usr/bin/uptime -p) is broken, so here's a reimplementation | |
2 boottime = 1245511822 | 3 boottime = 1245511822 |
3 import sys, os, time | 4 import sys, os, time |
4 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)." | 5 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)." |
5 opt_p, opt_s = 0, 0 | 6 opt_p, opt_s = 0, 0 |
6 for a in sys.argv[1:]: | 7 for a in sys.argv[1:]: |