Difference between revisions of "Sed -i"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
[[.BAK]] | [[.BAK]] | ||
[[gsed -i]] | [[gsed -i]] | ||
+ | [[Add line]] | ||
== See also == | == See also == |
Revision as of 09:59, 19 April 2023
-i tells sed to modify the file in place.
sudo sed -i '/#net.ipv4.ip_forward=1/s/^#//g' /etc/sysctl.conf
.BAK gsed -i Add line
See also
sed, gsed
,-n, -i
,Ansible: replace
,append
,Chef: Editing a file
,lineinfile
Advertising: