linux - Extract text from a variable -


in bash script have variable fete wich contains

{"feastedsaint": "eline,helena,helene,heliena,laetitia,lena,lenaic,nelly"} 

and in variable text

eline,helena,helene,heliena,laetitia,lena,lenaic,nelly 

how can linux / bash commands?

using

var='{"feastedsaint": "eline,helena,helene,heliena,laetitia,lena,lenaic,nelly"}' names=$(jq -r .feastedsaint <<<"$var") echo "$names" 
eline,helena,helene,heliena,laetitia,lena,lenaic,nelly 

the jshon equivalent be

names=$(jshon -e feastedsaint -u <<<"$var") 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -