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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -