diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-06 16:57:48 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-06 16:57:48 +0300 |
commit | f5596618ff3e6819c547bf833388d25b9bb36293 (patch) | |
tree | 7a47b6a3ba030e525d20713de428c14d06b6b9e4 /vsvs-parser | |
parent | f229b632cbc31c5efad109589cd36b07bcd48817 (diff) | |
download | vsvs-f5596618ff3e6819c547bf833388d25b9bb36293.tar vsvs-f5596618ff3e6819c547bf833388d25b9bb36293.tar.xz vsvs-f5596618ff3e6819c547bf833388d25b9bb36293.zip |
.
Diffstat (limited to 'vsvs-parser')
-rw-r--r-- | vsvs-parser | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vsvs-parser b/vsvs-parser new file mode 100644 index 0000000..ba9c098 --- /dev/null +++ b/vsvs-parser @@ -0,0 +1,15 @@ +#!/bin/bash +after () { test -z "${2##*$1*}" && echo -n "${2#*$1}" } +key="" +value="" +while IFS="" read line +do + if test -z "${line%% *}" + then value="${value}"$'\n'"$(after " " "$line")" + else + eval $1 + key="${line%% *}" + value="$(after " " "$line")" + fi +done +eval $1 |