![如果上一行中存在相同的行,则删除一行](https://linux22.com/image/58856/%E5%A6%82%E6%9E%9C%E4%B8%8A%E4%B8%80%E8%A1%8C%E4%B8%AD%E5%AD%98%E5%9C%A8%E7%9B%B8%E5%90%8C%E7%9A%84%E8%A1%8C%EF%BC%8C%E5%88%99%E5%88%A0%E9%99%A4%E4%B8%80%E8%A1%8C.png)
我想从 UNIX 命令行中删除前一行中已存在的行。我的文件中有以下数据。
<xref id="gi_525506931_ref_NP_001266519.1__brain_aromatase"/>
<entry ac="IPR002401" desc="Cytochrome P450, E-class, group I" name="Cyt_P450_E_grp-I" type="FAMILY">
<entry ac="IPR001128" desc="Cytochrome P450" name="Cyt_P450" type="FAMILY">
<entry ac="IPR001128" desc="Cytochrome P450" name="Cyt_P450" type="FAMILY">
<entry ac="IPR001128" desc="Cytochrome P450" name="Cyt_P450" type="FAMILY">
所以,它应该看起来像这样:
<xref id="gi_525506931_ref_NP_001266519.1__brain_aromatase"/>
<entry ac="IPR002401" desc="Cytochrome P450, E-class, group I" name="Cyt_P450_E_grp-I" type="FAMILY">
<entry ac="IPR001128" desc="Cytochrome P450" name="Cyt_P450" type="FAMILY">