diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-03 15:31:40 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-03 15:31:40 +0300 |
commit | e82157e5418706f4a39476e6e37389b7b1c7c883 (patch) | |
tree | 359b680cac09d52a6a514a584fbca5111da01337 /vsvs-get | |
parent | 1f1f425641754a4289d75673247d7d5abeb70bdb (diff) | |
download | vsvs-e82157e5418706f4a39476e6e37389b7b1c7c883.tar vsvs-e82157e5418706f4a39476e6e37389b7b1c7c883.tar.xz vsvs-e82157e5418706f4a39476e6e37389b7b1c7c883.zip |
.
Diffstat (limited to 'vsvs-get')
-rw-r--r-- | vsvs-get | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vsvs-get b/vsvs-get new file mode 100644 index 0000000..e7ab391 --- /dev/null +++ b/vsvs-get @@ -0,0 +1,25 @@ +#!/bin/bash +res="" +met=false +while IFS="" read str +do + if [ -z "${str##* *}" ] + then + key="${str%% *}" + val="${str#* }" + else + key="${str}" + val="" + fi + if [ -z "${key}" ] && [ $met == true ] + then + res="${res}"$'\n'"${val}" + elif [ "${key}" == "$1" ] + then + met=true + res="${val}" + else + met=false + fi +done +echo -n "${res}" |