如何在不带引号的 Windows CMD 标题中使用竖线 ( | )?

How can I use pipe ( | ) in Windows CMD title without quotes?

我正在玩 bash 脚本,我想知道如何在标题中使用管道符号?我试过 title "|" 但引号也在标题中。我还有其他方法可以做到这一点吗?

谢谢!

您可以使用 ^ 字符转义竖线 | 字符:

C:\Windows\System32> title HELLO ^| WORLD

输出: