Why does sed fail with International characters and how to fix?

前端 未结 2 2035
陌清茗
陌清茗 2020-12-03 14:28

GNU sed version 4.1.5 seems to fail with International chars. Here is my input file:

Gras Och Stenar Trad - From Moja to Minneapolis DVD [G2007D         


        
2条回答
  •  青春惊慌失措
    2020-12-03 14:55

    sed is not very well setup for non-ASCII text. However you can use (almost) the same code in perl and get the result you want:

    perl -pe 's/.*\| //' x
    

提交回复
热议问题