简体   繁体   中英

How to use # in linux terminal command

One of the character in my password contains # symbol. Due this, the shell omit rest of the command after # symbol. For example I have executed the following command in terminal,

fabric-ca-client enroll -u "https://admin:#D******9@ca.m-zzz.n-zzzz.managedblockchain.us-east-1.amazonaws.com:30002" --tls.certfiles /home/ec2-user/managedblockchain-tls-chain.pem -M /home/ec2-user/admin-msp

Due to # symbol in the password, I am getting the following error,

Error: Failed to create default configuration file: No username and password provided as part of the Fabric CA server URL

Try using single quotes(') instead of double quotes(") if you need to use special characters in CLI

fabric-ca-client enroll -u 'https://admin:#D******9@ca.m-zzz.n-zzzz.managedblockchain.us-east-1.amazonaws.com:30002' --tls.certfiles /home/ec2-user/managedblockchain-tls-chain.pem -M /home/ec2-user/admin-msp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM