我在文件中有以下形式的数据:
<http://purl.uniprot.org/here> <http://purl.uniprot.org/here/unipot/purl>
<http://purl.uniprot.org/uniprot/Q196Y7> <http://purl.uniprot.org/core/annotation>
我想删除尖括号内的所有“ http://purl.uniprot.org ”。这样我得到的输出是
<here> <here/unipot/purl>
<uniprot/Q196Y7> <core/annotation>
我尝试使用 vi 的替换命令这样做。但事实证明它很慢,因为我的文件是 1TB。有没有更有效的方法来使用 linux/python 做同样的事情
我知道我可以使用 sed 但 sed 查找的模式并删除它们,而我想删除确切的内容