From 34f88c5948f4a0e871ba6dc29262b64363c94b15 Mon Sep 17 00:00:00 2001 From: Pat Beirne Date: Thu, 25 Mar 2021 09:38:25 -0400 Subject: [PATCH] added a blank line after dir, gives a cleaner page; simplified the first example in README.md --- README.md | 14 ++++++-------- tf.py | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3201c0b..e8f664d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ or you can use the builtin command line and -rwx all 6949 tf.py -rwx all 15 webrepl_cfg.py disk size: 392 KB disk free: 196 KB + /$ cat -n -l 1000-1005 mqtt.log ====mqtt.log===== 1000 1616120701: Client mosq-d911rjWHX3Rdwcntoo disconnected. @@ -37,14 +38,11 @@ disk size: 392 KB disk free: 196 KB 1004 1616126374: Socket error on client DVES_98843E, disconnecting. 1005 1616126425: Client DVES_83244E has exceeded timeout, disconnecting. -/$ sed x/24\.114\.80/ mqtt.log -Lines processed: 1415 Lines modifed: 4 -/$ cat -n mqtt.log -====mqtt.log===== -1 1616120273: New connection from 24.114.80.91 on port 1883. -2 1616120273: New client connected from 24.114.80.91 as Rutherford1616120233590 (c1, k60, u'patb'). -3 1616142039: New connection from 24.114.80.109 on port 1883. -4 1616142039: New client connected from 24.114.80.109 as Rutherford1616120233590 (c1, k60, u'patb'). +/$ grep 24.114.80.\d+ mqtt.log +977 1616120273: New connection from 24.114.80.91 on port 1883. +980 1616120273: New client connected from 24.114.80.91 as Rutherford1616120233590 (c1, k60, u'patb'). +1046 1616142039: New connection from 24.114.80.109 on port 1883. +1049 1616142039: New client connected from 24.114.80.109 as Rutherford1616120233590 (c1, k60, u'patb'). /$ ``` diff --git a/tf.py b/tf.py index 6f66aae..c3c96b7 100755 --- a/tf.py +++ b/tf.py @@ -133,7 +133,7 @@ def _dir(d=''): except: print("not a valid directory") s=os.statvfs('/') - print("disk size:{:8d} KB disk free: {} KB".format(s[0]*s[2]//1024,s[0]*s[3]//1024)) + print("disk size:{:8d} KB disk free: {} KB\n".format(s[0]*s[2]//1024,s[0]*s[3]//1024)) '''-----cut here if you only need the above functions-----'''