in reply to Re: How do I keep the command line from eating the backslashes?
in thread How do I keep the command line from eating the backslashes?

Ahh... I'd love to be able to do that... But what if I cannot control the input? I'm reading input destined for another program, and I (most unfortunately) don't have control of what's generating the commandline.

So, I'm always going to get \" instead of \\"
  • Comment on Re^2: How do I keep the command line from eating the backslashes?

Replies are listed 'Best First'.
Re^3: How do I keep the command line from eating the backslashes?
by VSarkiss (Monsignor) on Feb 11, 2005 at 22:16 UTC
Re^3: How do I keep the command line from eating the backslashes?
by sgifford (Prior) on Feb 12, 2005 at 04:09 UTC
    Two thoughts.

    First, it's the shell that's eating the quotes and backslashes. If you change the shell to a program of your own, you can process these characters however you want. Many programs use the SHELL environment variable to select the shell to run, so changing that might help.

    Second, in order for arguments to have gotten through the shell, they must have been quoted properly. quotemeta can quote them properly, even if it's not the same way they were originally quoted.