diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-01 23:12:51 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-12-01 23:12:51 +0300 |
commit | d9e4285a19f250dcbac946e8665b3701c8859f91 (patch) | |
tree | dd1836aa833d72aa53898846bbaad8efe6c876aa | |
parent | 965790f4f600790cf68a84ec052426abc39c69c8 (diff) | |
download | vsvs-d9e4285a19f250dcbac946e8665b3701c8859f91.tar vsvs-d9e4285a19f250dcbac946e8665b3701c8859f91.tar.xz vsvs-d9e4285a19f250dcbac946e8665b3701c8859f91.zip |
.
-rw-r--r-- | vsvs.sh | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,19 +2,19 @@ res="" met=false while read line do - value=$(echo -n "$line" | sed 's/ .*//') + value="$(echo -n "$line" | sed 's/ .*//')" if [ "${line:0:1}" == " " ] then if [ $met == true ] then - res="$res\n$value" + res="${res}\n${value}" fi else - if [ $(echo -n "$line" | sed 's/[^ ]* //') == $1 ] + if [ "$(echo -n "${line}" | sed 's/[^ ]* //')" == "$1" ] then met=true - res=value + res="${value}" fi fi done -echo -n $res +echo -n "${res}" |