- Jun
- 127
- 2
I wrote a litte program to explore what happens to interfere with characters on the command line passed to a progam. The source code is available at
http://mindprod.com/jgloss/commandline.html
Here are some puzzling results:
[C:\]java com.mindprod.example.TestParms "a b"
1 parameter
{a b}
--done--
[C:\]java com.mindprod.example.TestParms " \" "
1 parameter
{ " }
--done--
[C:\]java com.mindprod.example.TestParms " > "
1 parameter
{ > }
--done--
[C:\]java com.mindprod.example.TestParms " \" > "
TCC: (Sys) The system cannot find the file specified.
The puzzles:
1. the use of \" is not documented
2. > is sometimes treated literally and sometimes treated as redirection.
How do you quote a complex parm like a REGEX that may contain the kitchen sink " \ < > $? ; ` ? | &
I am using TCC 9.02.151 Windows Vista [Version 6.0.6001]
http://mindprod.com/jgloss/commandline.html
Here are some puzzling results:
[C:\]java com.mindprod.example.TestParms "a b"
1 parameter
{a b}
--done--
[C:\]java com.mindprod.example.TestParms " \" "
1 parameter
{ " }
--done--
[C:\]java com.mindprod.example.TestParms " > "
1 parameter
{ > }
--done--
[C:\]java com.mindprod.example.TestParms " \" > "
TCC: (Sys) The system cannot find the file specified.
The puzzles:
1. the use of \" is not documented
2. > is sometimes treated literally and sometimes treated as redirection.
How do you quote a complex parm like a REGEX that may contain the kitchen sink " \ < > $? ; ` ? | &
I am using TCC 9.02.151 Windows Vista [Version 6.0.6001]