If I needed to append a username to the end line 32 on a file, how would I do so?
I can find on Google how to add text to the beginning of a line with sed
, but I can't figure out how I would append it to the end, or even the middle, if that was possible.
Best Answer
You can substitute your text for the line end (
$
) like this:To insert text in the middle of the line some information about the line structure would be useful.