How to add text to the end of each line in Linux

We can use sed utility to add text to the end of each line.

#sed -i s/$/text/ file.txt

Here '$' matches the end of line and we need to replace text, file.txt with the appropriate values.

That's all…

Leave a Reply

Your email address will not be published. Required fields are marked *