如何修复 Windows "echo $PATH" 空结果

当你尝试运行

example-3.sh

你将始终得到空结果。

相反,如果你在 cmd 中,使用

example-2.txt
echo %PATH%

如果你使用 PowerShell,你需要使用

example-1.powershell
$env:PATH

Check out similar posts by category: PowerShell, Windows