diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2014-10-29 12:03:32 -0400 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2014-10-29 12:03:32 -0400 |
commit | cefc352c74d7d6ed7c9091eee9acac3a08c92a1e (patch) | |
tree | 69638968c99715185219dfa14d4e637c5d83505f | |
parent | e1b0ab17458d5dce5f228a6e6e231d8128db2e4b (diff) | |
download | plan9front-cefc352c74d7d6ed7c9091eee9acac3a08c92a1e.tar.xz |
newt: only print a date if we've managed to extract a date
-rwxr-xr-x | rc/bin/newt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rc/bin/newt b/rc/bin/newt index b65df64b5..9417e64d7 100755 --- a/rc/bin/newt +++ b/rc/bin/newt @@ -49,7 +49,10 @@ fn fmtd{ ti=$date(3) if not ti=`{echo $date(4) | awk '{print substr($0,0,5);}'} - echo $mo/$da $ti + if(! ~ $#mo 0 && ! ~ $#da 0 && ! ~ $#ti 0) + echo $mo/$da $ti + if not + echo nil } fn geth{ for(i in $*){ |