Substituting a line in Python
41151
Search and replace a line in a file in Python
65270
How do I perform string matching and replacements?
104899
Why do newline characters get lost when using command substitution?
25626
How to replace a character by a newline in Vim
7986
How can I remove a trailing newline?
43946
Process substitution and pipe
117459
Emacs copy matching lines
5460
How do I replace characters only on certain lines?
71651
How can I do a line break (line continuation) in Python?
38175
How can I use a variable in the replacement side of the Perl substitution operator?
107006
Replace first line of a text file in Java
145602
Prepend a line to an existing file in Python
109073
Javascript replacing new line character
19935
String replacement using a dictionary
88254
How do I perform a Perl substitution on a string while keeping the original?
12961
How can I use variables in the LHS and RHS of a sed substitution?
158267
Insert text in specific lines of a file