What is the `tr` command in Windows?
问题 What is the Windows equivalent of the tr command in Linux? For example, tr can replace all colons with a newline character. Can this be done in Windows? $ echo $PATH | tr ':' '\n' /usr/local/bin /usr/bin 回答1: in powershell we have split see this example $a=( echo $env:Path | Out-String ) $a -split ";" before : %SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System 32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C: