changeset 126:53006db54871

better btot
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Tue, 29 Jun 2021 07:53:47 +0000
parents cd927e5c133f
children 3bc1d24363a1
files .bashrc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.bashrc	Mon Jun 28 21:50:30 2021 +0000
+++ b/.bashrc	Tue Jun 29 07:53:47 2021 +0000
@@ -91,7 +91,10 @@
     python3 -c 'import sys
 n=0
 for l in sys.stdin:
- n+=int(l)
+ try:
+  n+=int(l)
+ except ValueError as e:
+  print(e,file=sys.stderr)
 print(n)
 '
 }