bash sh.exe”:意外标记附近的语法错误`('

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23598642/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 10:25:26  来源:igfitidea点击:

sh.exe": syntax error near unexpected token `('

gitbashcommand-linecommand

提问by user3303314

All that I'm trying to do is cd into Program Files (x86) and I get this:

我要做的就是将 cd 放入 Program Files (x86) 中,然后得到以下信息:

Already in the C directory--

已经在C目录中——

$ cd Program Files (x86)

$ cd 程序文件 (x86)

sh.exe": syntax error near unexpected token `('

sh.exe”:意外标记附近的语法错误`('

回答by CupawnTae

you need to quote the directory name or escape special characters

您需要引用目录名称或转义特殊字符

try

尝试

cd "Program Files (x86)"

or

或者

cd Program\ Files\ \(x86\)