如何在终端中传递带引号和单引号的密码? [英] How to pass a password with quotes and single quotes in terminal?
问题描述
我为Android应用程序创建了一个.keystore,生成了一个随机密码.它在同一密码中包含引号()和单引号('),例如:xxxxxx" xxx!\ x ='x
I created a .keystore for my Android application, generating a random password. It contains quotes (") and singles quotes (') in the same password, like this one: xxxxxx"xxx!\x='x
我正在尝试使用keytool传递密码.如何通过密码?
I am trying to pass the password using keytool. How can I pass the password?
keytool -list -storepass "<my_password>" -keystore my.keystore
并显示:
-bash:!\ xx'x:找不到事件
-bash: !\xx'x": event not found
谢谢!
编辑我尝试使用:
keytool -list -storepass xxxxxx\"xxx\!x=\'x -keystore my.keystore
keytool错误:java.io.IOException:密钥库被篡改,或者密码不正确
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
推荐答案
不幸的是,我想您必须转义特殊字符,例如:
Unfortunately I guess you have to escape the special characters, like this:
xxxxxx \"xxx \\!xx \'x
这篇关于如何在终端中传递带引号和单引号的密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!