Command Line Parameters

  • Thread starter Thread starter Michael Shaw
  • Start date Start date
M

Michael Shaw

Is there a way to pass a command-line parameter which
contains a newline?

For example

c:\>someCommand param1 Name\nAddress

I want param2 to be treated as one parameter which
contains a newline. Is there a way to get the shell to
do that?
 
I'm not sure, but yes it does seem that it would be up to
the command to interpret the parameters.

I know I can pass agruments with spaces in them by
placing the argument in quotes like:

someCommand "My First Name"

I just didn't know if there is some type of pre-
processing the shell does to the params. I was hoping
there might be some type of escape sequence that such a
preprocessor would send to the command as a newline.

I appreciate your response and will give it a try.
 
Back
Top