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