【发布时间】:2020-06-27 23:14:27
【问题描述】:
我有一个文本文件 File.txt,内容如下
Application_Servers\Base\Baseinstall\BGInfo
Application_Servers\Base\Baseinstall\CLRRSServerManager
Application_Servers\Base\Baseinstall\PCSUtils
Application_Servers\Base\Baseinstall\PostOSLoad
Application_Servers\Base\Baseinstall\Registration
Application_Servers\Base\Baseinstall\WMI
Application_Servers\Base\Baseinstall\x64\RSAutoExNt\v1.2
Application_Servers\Base\w2k16update\EveryTime
RS Batch\RSQueueClientLib\V_1_0
RS Batch\RSQueueClientLib\V_2_2
Utilities\Clrstuff\clrrs\Bin
我想用/替换\,我该如何实现呢?请给我shell命令
【问题讨论】:
-
你自己试过什么,什么没用?
-
这取决于你走哪条路。如果你有你展示的内容并想用
'/'替换'\'并且你在Unix/Linux机器上,你想要tr '\\' '/'(例如tr '\\' '/' < file > newfile)..如果你不在Unix/ Linux 机器,那么为什么有 POSIX shell 标签[shell]和[sh]对 Windows 没有应用(WSL 除外)。
标签: powershell shell sh powershell-2.0 powershell-3.0