| vijirin (11) | ||
|
Dear ALL, I wrote a c++ program which accepts username and passwd. I executed the binary from linux terminal as follows
verfiypwd ---> program name support,supp&123 ----> inputs to the program. Username and PAsswd respectively. When I give a password with '&' it truncates any characters after that and gives the above result. What I understand is when a & is encountered it treats it to execute as a foreground process and the rest are reported as unidentified. Could you please suggest how i can input the string with '&'. One option is to give the passwd string within "". Is there any way other than this. Regards Viji R | ||
|
|
||
| Athar (4378) | |
| You need to escape special characters: \& | |
|
|
|