User Tools

Site Tools


sed:change:change_string_on_a_range_of_lines

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
sed:change:change_string_on_a_range_of_lines [2020/08/17 23:26] 192.168.1.1sed:change:change_string_on_a_range_of_lines [2020/08/17 23:27] (current) 192.168.1.1
Line 10: Line 10:
 sed '2,$ s/unix/linux/' filename sed '2,$ s/unix/linux/' filename
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  **$** indicates the last line in the file.
 +
 +So the sed command replaces the text from second line to last line in the file.
 +</WRAP>
 + 
sed/change/change_string_on_a_range_of_lines.1597706785.txt.gz · Last modified: 2020/08/17 23:26 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki