summaryrefslogtreecommitdiff
path: root/vsvs-parser
blob: c676049b540b64fb114373a77ac7966519582b18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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