sed snipplets to manipulate file content.
Following file:
user@host % more example.txt
Lorem ipsum
dolor sit amet,
consectetur adipiscing elit,
Add a character at the beginning of each line using sed command. Add ! at the front of each line:
user@host % sed 's/^/!/' example.txt
!Lorem ipsum
!dolor sit amet,
!consectetur adipiscing elit,
Add a character at the end of each line using sed command. Add # at the end of each line:
user@host % sed 's/$/!-end/' example.txt
Lorem ipsum !-end
dolor sit amet, !-end
consectetur adipiscing elit,!-end