Bash script to convert from HTML entities to characters

前端 未结 10 628
悲哀的现实
悲哀的现实 2020-12-02 09:59

I\'m looking for a way to turn this:

hello < world

to this:

hello < world

I could use sed, but

10条回答
  •  一生所求
    2020-12-02 10:13

    Try recode (archived page; GitHub mirror; Debian page):

    $ echo '<' |recode html..ascii
    <
    

    Install on Linux and similar Unix-y systems:

    $ sudo apt-get install recode
    

    Install on Mac OS using:

    $ brew install recode
    

提交回复
热议问题