So obviously I am trying italicize the first word of each paragraph in a huge document. I think its relatively easy to add the prefix but how do I delineate just the first word for the postfix instead of the end of the line? The file should be space delimited.
sed -e 's/^/<i>/' file > file.new
Do I need to run sed twice with different syntax or is this doable with one command? I am outputting to a new file in case I screw up.
Here is an example of a couple lines of the file:
Snapdragon Plant with a two-lipped flower. Snap-fastener = *press-stud. Snapper Any of several edible marine fish. Snappish 1 curt; ill-tempered; sharp. 2 inclined to snap.
I want it to be as below:
<i>Snapdragon</i> Plant with a two-lipped flower. <i>Snap-fastener</i> = *press-stud. <i>Snapper</i> Any of several edible marine fish. <i>Snappish</i> 1 curt; ill-tempered; sharp. 2 inclined to snap.
not all the lines are single, some terms have multiple lines of definition.