How can I find a word (e.g. "/dn") in a text file and add on the next line another word (e.g. "/period")?
I'd like to execute it using MS DOS.
I mean this "/dn" (after /dn is space) is one word (not a fragment of the text, but the whole word--after /dn can be other word on the same line) which I want to find and then after it on the next new line, not replacing the other lines and other words. I mean create a new line between already existing lines.
For example, if I have this input file:
/dn
/name
I want this output:
/dn
/period
/name
and "/" symbol should be with dn, not without it.
/dn
always be the only word in the line? Can you have more than one/dn
on the same line? What if you have/dna
, does that count? Can you have spaces before or after the/dn
?/dn
is the "single word on one line". This is why it is important to show us representative examples of your data.