mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 13:24:25 -07:00
improved key=value assigment
This commit is contained in:
parent
5ab11ebc68
commit
8183c1f781
13 changed files with 26 additions and 82 deletions
|
@ -907,9 +907,7 @@ json_list() {
|
|||
while read line; do
|
||||
|
||||
# Assing key=value pair
|
||||
for key in $line; do
|
||||
eval ${key%%=*}=${key#*=}
|
||||
done
|
||||
eval $line
|
||||
|
||||
# Closing bracket if there already was output
|
||||
if [ -n "$data" ]; then
|
||||
|
@ -960,9 +958,7 @@ shell_list() {
|
|||
# Reading file line by line
|
||||
while read line ; do
|
||||
# Assing key=value pair
|
||||
for key in $line; do
|
||||
eval ${key%%=*}=${key#*=}
|
||||
done
|
||||
eval $line
|
||||
|
||||
# Print result
|
||||
eval echo "$fields"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue