User Tools

Site Tools


sed:change:change_lines_which_do_not_contain_a_specific_string

SED - Change - Change lines which do NOT contain a specific string

Substitute “foo” with “bar” EXCEPT for lines which contain “baz”.

sed '/baz/!s/foo/bar/g'
sed/change/change_lines_which_do_not_contain_a_specific_string.txt · Last modified: 2020/08/17 23:05 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki