Modify a line using sed May 11, 2021 Here’s how to modify a line in a file using sed. sed -i 's/replace me.*/with this text/' /path/to/a/file.txtsed -i 's/replace me.*/with this text/' /path/to/a/file.txt