I want to put each line within quotation marks, such as:
abcdefg
hijklmn
opqrst
convert to:
\"abcdefg\"
\"hijklmn\"
\"opqrs
I used sed with two expressions to replace start and end of line, since in my particular use case I wanted to place HTML tags around only lines that contained particular words.
So I searched for the lines containing words contained in the bla variable within the text file inputfile and replaced the beginnign with and the end with
Similar to:
$ bla=foo
$ sed -e "/${bla}/s#^##" -e "/${bla}/s#\$#
#" inputfile
foo
bar
$