我想跨度標籤的內容複製在第31行,並把它放在第5行使用替換文件的行內容的sed,awk的等
輸入文件:
...
<h1>
This is line 5, and it is a default string for all files
</h1>
...
...
<span id="foo"> This is line 31, different in every file </span>
...
輸出繼電器文件:
...
<h1>
This is line 31, different in every file
</h1>
...
...
<span id="foo"> This is line 31, different in every file </span>
...
非常感謝!
改爲使用node.js。 – webb