summaryrefslogtreecommitdiff
path: root/vsvs-parser
blob: ba9c098c911bccfa851832832765ad56602078cf (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