From e82157e5418706f4a39476e6e37389b7b1c7c883 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Thu, 3 Dec 2020 15:31:40 +0300 Subject: . --- vsvs-map | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 vsvs-map (limited to 'vsvs-map') diff --git a/vsvs-map b/vsvs-map new file mode 100644 index 0000000..e1cbd49 --- /dev/null +++ b/vsvs-map @@ -0,0 +1,22 @@ +#!/bin/bash +res="" +buf="" +while IFS="" read str +do + if [ -z "${str##* *}" ] + then + key="${str%% *}" + val="${str#* }" + else + key="${str}" + val="" + fi + if [ -z "${key}" ] + then + buf="${buf}"$'\n'"${val}" + else + res="${res}$(echo -n "${buf}" | $1)" + buf="${val}" + fi +done +echo -n "${res}" -- cgit v1.2.3