Replacing characters in a text file with a batch file

前端 未结 7 479
一个人的身影
一个人的身影 2021-01-18 08:03

Is there a way to replace some characters in a text file with a batch file?

I didn\'t find any command to do that.

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-18 09:10

    you can install unxutils and then do

    sed "s/WORD_FROM/WORD_TO/" file_name > changed.file.name
    

    to change words or

    cat file|tr "a" "b"  > changed.file.name
    

    to change characters

提交回复
热议问题