From 965790f4f600790cf68a84ec052426abc39c69c8 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Tue, 1 Dec 2020 23:10:17 +0300 Subject: . --- vsvs.c | 0 vsvs.sh | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+) delete mode 100644 vsvs.c create mode 100644 vsvs.sh diff --git a/vsvs.c b/vsvs.c deleted file mode 100644 index e69de29..0000000 diff --git a/vsvs.sh b/vsvs.sh new file mode 100644 index 0000000..f3ca70d --- /dev/null +++ b/vsvs.sh @@ -0,0 +1,20 @@ +res="" +met=false +while read line +do + value=$(echo -n "$line" | sed 's/ .*//') + if [ "${line:0:1}" == " " ] + then + if [ $met == true ] + then + res="$res\n$value" + fi + else + if [ $(echo -n "$line" | sed 's/[^ ]* //') == $1 ] + then + met=true + res=value + fi + fi +done +echo -n $res -- cgit v1.2.3