2

I have a file which contain following content.

file.txt (Note: file content not static, its dynamic)

H 0 7 11 *

I want to insert them between two pattern match using sed like following example,

infile content

...
...
<spec>H 0 7 11 *</spec>
...
...

I have tried following but i failed :( its putting below that line.

   $ sed '/<spec>/ r file.txt' infile

This is the output i am getting how do i put that between two match?

 <spec></spec>
   H 0 7 11 *
4

2 に答える 2