Linux command line semicolon

I run my application on Linux, providing input as a command line. My input field contains an argument containing the inner dot ";" (semicolon) (for example: 123; 434; 5464). This will be analyzed using the UEF8String encoding and sending. But when I use this, first I get

bash: 434: command not found bash: 5464: command not found 

And when I capture traffic, the output contains only 123 instead of 123; 434; 5464 But if I give without a semicolon (example: 123: 434: 5464), I don't get any problems with the output, which will be fixed, like 123: 434: 5464

Tell me how to give input on the command line using a semicolon to exit. Is there any specific syntax to use when using semicolons. I run like below

 ./runASR.sh -ip 10.78.242.4 -port 3868 -sce 10.78.241.206 -id 85;167838865;1385433280 

where the -id field contains this value with the problem.

+7
linux bash shell
source share
1 answer

; the end of the command character is processed. So 123;456;5464 before bash is actually 3 teams. To transmit such metacharacters, output it using the escape character \ .

 ./command 123\;456\;5464 

Or just quote it with a single quote ( double quote evaluates the inner string ) (thanks Triplee, I forgot to mention this)

 ./command '123;456;5464' 
+18
source share

All Articles