Answers for "sed"

3

sed

-i
sed -i 's/#mode/mode/' file.txt
http://sed.sourceforge.net/sed1line.txt

 # substitute "foo" with "bar" ONLY for lines which contain "baz"
 sed '/baz/s/foo/bar/g' file.sh
Posted by: Guest on January-15-2021
1

sed

sed 's/foo/bar/'
http://sed.sourceforge.net/sed1line.txt
Posted by: Guest on July-25-2020

Browse Popular Code Answers by Language