sed
Add a character to begin of a line
echo "Add a asterix at the begin of this line"|sed 's/$/*/g'
Add a character to end of line
echo "Add a asterix at the end of this line"|sed 's/$/*/g'
Insert line above in the same line
echo hello | sed -e '/hello/i line above' -e '/hello/a line below'