I want to change the variance of the "email address" in the lower case jSON message. I tried using sed, but could not, as the \ L option does not work for me. Did I miss something?
a="{"id":null,"enabled":true,"password":"","email":"Foo@bar.com","lastName":"Foo","firstName":"lol"}"
echo $a | sed -e 's/email:[[:graph:]].*,last/\L&/g'
Result:
{id:null,enabled:true,password:,{L}email:Foo@bar.com,lastName:Foo,firstName:lol}
As a result, I want:
{id:null,enabled:true,password:,email:foo@bar.com,lastName:Foo,firstName:lol}
source
share