Use sed to replace all backslashes with forward slashes

后端 未结 9 965
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 04:09

I want to be able to use sed to take an input such as:

C:\\Windows\\Folder\\File.txt

to

C:/Windows/Folder/File.txt
<         


        
9条回答
  •  庸人自扰
    2020-11-27 04:31

    for just translating one char into another throughout a string, tr is the best tool:

    tr '\\' '/'
    

提交回复
热议问题