User Tools

Site Tools


sed:change:change_string_on_a_range_of_lines

SED - Change - Change string on a range of lines

sed '1,3 s/unix/linux/' filename

or

sed '2,$ s/unix/linux/' filename

NOTE: $ indicates the last line in the file.

So the sed command replaces the text from second line to last line in the file.

sed/change/change_string_on_a_range_of_lines.txt · Last modified: 2020/08/18 00:27 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki