summaryrefslogtreecommitdiff
path: root/vsvs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vsvs.sh')
-rw-r--r--vsvs.sh20
1 files changed, 20 insertions, 0 deletions
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