summaryrefslogtreecommitdiff
path: root/fillzero
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2013-02-04 09:12:35 (GMT)
committerJan Huwald <jh@sotun.de>2013-02-04 09:12:35 (GMT)
commitc9e8fc6758d7e34bede3a22360a7831c15f3342c (patch)
treed4d4ffc8ce287c4ce58b2bacb5bc34536f2d94c6 /fillzero
parent3ce4b80aca1dd238f00cbedfd7ef015842f6ca9f (diff)
add fillzero
Diffstat (limited to 'fillzero')
-rwxr-xr-xfillzero10
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
contact: Jan Huwald // Impressum