Modify a line using sed May 12, 2021 • Ulysses Here’s how to modify a line in a file using sed. <pre lang="bash"> sed -i 's/replace me.*/with this text/' /path/to/a/file.txt