Article 4W5SR searching sed inplace from stdout

searching sed inplace from stdout

by
vijaytamil2000
from LinuxQuestions.org on (#4W5SR)
Hello Folks,

I am searching a command where i want to write the replace string into files.

Below are the scenarios.

I have file called test.txt and the below are the contents.

[wininstall]
server1fqdn: server1.com
server1comps: ifwe=False ifge=False ifze=False

server2fqdn: server2.com
server2comps: ifwe=False ifge=True ifze=False

[endwininstall]

Now i am trying to replace 'ifge=True' to false in the text.txt file.

I tried the below commanad:

cat test.txt | grep -w server2comps | cut -d ":" -f2-14 | grep -oP 'ifge[^[:blank:]]*' | sed 's/True/False/g'

output:

ifge=False

But my question is how can write this changes in file directly using 'i' option.

Can any help me out this.latest?d=yIl2AUoC8zA latest?i=8mOTJPZ7vfk:GfAISNSZFb0:F7zBnMy latest?i=8mOTJPZ7vfk:GfAISNSZFb0:V_sGLiP latest?d=qj6IDK7rITs latest?i=8mOTJPZ7vfk:GfAISNSZFb0:gIN9vFw8mOTJPZ7vfk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments