bash - Sed cannot convert uppercase to lowercase -


I want to change the "email address" variance in lowercase in a JSON message. I tried to use sed but failed, because \ l option does not work for me, am I missing something?

  a = "{" id ": null," enabled ": true," password ":" "," email ":" foo@bar.com "," last name ": "Foo", "First Name": "Eligible"} "Allo $ a | Sed -e / s Email: [[Graph:]]. *, The last / \ L & g / ' 

returns the result:

  {id: blank, enabled: true, password :, {l} Email: Foo @ Bar Com, last name: foo, firstname: lol}  

I want the result:

  {ID: blank, enabled: true, password :, email: foo @ Bar.com, lastName: foo, first name: lol}  

I think That you do not have GNU sed and therefore do not have access to \ l . Instead, try Perl:

  "$ a" echo Perl -pe 's / (email: [[graph:]] *, last) / \ L \ 1' '  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -