Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell gfsh命令不接受带有特殊字符的密码'';从gfsh控制台_Shell_Scripting_Gemfire_Gfsh - Fatal编程技术网

Shell gfsh命令不接受带有特殊字符的密码'';从gfsh控制台

Shell gfsh命令不接受带有特殊字符的密码'';从gfsh控制台,shell,scripting,gemfire,gfsh,Shell,Scripting,Gemfire,Gfsh,当我们有带有特殊字符的密码时,无法使用gfsh控制台连接到启用身份验证的gemfire群集。使用以下命令登录gemfire群集 gfsh -e "connect --locator=localhost[13120] --user=$(getProperty 'AUTH_USER') --password=$(getProperty 'AUTH_PASSWORD')" 其中密码类似于'p*Q8!j6c'。我试着逃跑用“\!”表示。当我手动打开gfsh控制台并从shell脚本

当我们有带有特殊字符的密码时,无法使用gfsh控制台连接到启用身份验证的gemfire群集。使用以下命令登录gemfire群集

gfsh -e "connect --locator=localhost[13120]  --user=$(getProperty 'AUTH_USER') --password=$(getProperty 'AUTH_PASSWORD')"
其中密码类似于'p*Q8!j6c'。我试着逃跑用“\!”表示。当我手动打开gfsh控制台并从shell脚本手动提供它时,它对我来说工作得很好


如果您能帮助我传递密码参数,那将是一个很大的帮助。

您应该能够执行以下操作:

eval '$GFSH -e "connect --user=foo --password=S*A8!j6c"'

这避免了shell试图扩展历史记录。如果您在bash中,您还可以使用
set+H

禁用历史扩展。在bash下,它似乎对我很有效。尝试使用shell调试运行您的gfsh:bash-xGFSH。。。然后查看最后一行打印的内容。这将显示命令参数是如何展开的。例如,我的示例显示:`+/Library/../bin/java-Dgfsh=true-Dlog4j.configurationFile=classpath:log4j2-cli.xml-classpath'/lib/gfsh dependencies.jar:/Users/jdeppe/workspace/gemfire-develope/open/geode-assembly/build/install/apache-geode/extensions/*'org.apache.gede.management.internal.cli.Launcher-e'connect-user=foo*--密码=foo*!'`