diff options
-rw-r--r-- | VERSION | 2 | ||||
-rwxr-xr-x | nwatch | 10 |
2 files changed, 7 insertions, 5 deletions
@@ -1 +1 @@ -2.0.0 +2.0.1 @@ -71,16 +71,18 @@ done # Write diff to stdout if it exists (not an error if it doesn't) if [[ -r $diff ]] ; then - awk '/^[-+]Not shown: / { next } + awk ' +/^[-+]Not shown: / { next } /^[-+]/ { diff = 1 } NF { lines[++l] = $0 } function write() { if (diff) { - for (l in lines) - print lines[l] + for (n = 1; n <= l; n++) + print lines[n] print "" + diff = 0 } - diff = l = 0 + l = 0 } !NF { write() } END { write() } |