diff options
-rwxr-xr-x | fillzero | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fillzero b/fillzero new file mode 100755 index 0000000..582a54a --- /dev/null +++ b/fillzero @@ -0,0 +1,10 @@ +#!/bin/bash + +oi= +while read i v; do + if [ -n "$oi" ] && [ $(($oi + 1)) -lt $i ] ; then + seq $(($oi + 1)) $i | sed 's/$/\t0/' + fi + oi=$i + echo -e "$i\t$v" +done
\ No newline at end of file |