I have below pattern in my file at different lines
""key"": null
I want to replaceu this to
""key"": ""test""
through linux
i used the below commands:
sed -i 's/ null / ""test"" /' sed -i 's/ null / ""test"" /'
but failed.
Advertisement
Answer
This should do it:
sed -i 's/null/""test""/g' file.txt