Sep 19, 2018

How to add a prefix string to beginning of each line

sed -e 's/^/prefix/' file

# If you want to edit the file in-place
sed -i -e 's/^/prefix/' file

# If you want to create a new file
sed -e 's/^/prefix/' file > file.new