私はhtmlプロジェクトに取り組んでおり、膨大な数のファイルを操作する必要があるため、作業にsed、head&tailを使用していますが、この時点で行き詰まりました。
削除する文字列<i><font color="#000000"> and <font color="#000000"><i>
で始まる行ではありません<b><font color="#000000"><p align="JUSTIFY"> and <p align="JUSTIFY"> and </font></b><p align="JUSTIFY">
ところで、私はそれを書いたが、何が問題なのか理解できない
sed -rei '/^<b><font color="#000000"><p align="JUSTIFY">RELATIONS.|<p align="JUSTIFY">|</font></b><p align="JUSTIFY">/! s/<font color="#0000ff"><i>|<i><font color="#0000ff">//g'
どんな助けや提案も大歓迎です。
よろしく
編集:htmlをもう一度見た後、すべてのファイルの最後の行を除いて、実際には8行目から最後まで編集したいことがわかりました
例
line 1 <i>some text<i>
line 2 <i>some text<i>
line 3 <i>some text<i>
line 4 <i>some text<i>
line 5 <i>some text<i>
line 6 <i>some text<i>
line 7 <i>some text<i>
line 8 <i>some text<i>
line 9 <i>some text<i>
line 10 <i>some text<i>
S <i>some text<i>
o <i>some text<i>
- <i>some text<i>
o <i>some text<i>
n <i>some text<i>
line N <i>some text<i>
に
line 1 <i>some text<i>
line 2 <i>some text<i>
line 3 <i>some text<i>
line 4 <i>some text<i>
line 5 <i>some text<i>
line 6 <i>some text<i>
line 7 <i>some text<i>
line 8 some text
line 9 some text
line 10 some text
S some text
o some text
- some text
o some text
n some text
line N <i>some text<i>