linux - replace null to ""test"" in a file using unix -


i have below pattern in file @ different lines

""key"": null 

i want replaceu

""key"": ""test"" 

through linux

i used below commands:

sed -i 's/ null / ""test"" /' sed -i 's/ null / \"\"test\"\" /' 

but failed.

this should it:

 sed -i 's/null/\"\"test\"\"/g' file.txt 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -