summaryrefslogtreecommitdiff
path: root/vsvs-map
diff options
context:
space:
mode:
Diffstat (limited to 'vsvs-map')
-rw-r--r--vsvs-map22
1 files changed, 22 insertions, 0 deletions
diff --git a/vsvs-map b/vsvs-map
new file mode 100644
index 0000000..e1cbd49
--- /dev/null
+++ b/vsvs-map
@@ -0,0 +1,22 @@
+#!/bin/bash
+res=""
+buf=""
+while IFS="" read str
+do
+ if [ -z "${str##* *}" ]
+ then
+ key="${str%% *}"
+ val="${str#* }"
+ else
+ key="${str}"
+ val=""
+ fi
+ if [ -z "${key}" ]
+ then
+ buf="${buf}"$'\n'"${val}"
+ else
+ res="${res}$(echo -n "${buf}" | $1)"
+ buf="${val}"
+ fi
+done
+echo -n "${res}"