in reply to command line and quotes

TIAS. YMMV

Different command shells handle quotes differently. The rules for Windows are quite different (in subtle ways) than those for *nix for example. However pretty much all command shells generate an argument array - an array of strings that corespond to the "arguments" passed on the command line. If the arguments contain various special characters they need to be quoted. But the kind shell removes the quotes for you. After all, all you really want are the arguments right?

If you really need the quotes, put em back. If you need to distinguish between an argument that was quoted and one that wasn't, then you are pretty much stuffed unless you quote the quotes.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: command line and quotes
by skerr1 (Sexton) on Jun 02, 2006 at 04:42 UTC

    Dang. Thought so. So I guess I could say that for tool foo, if there is an argument "-s", that I need to add quotes around the following argument. Guess that's the way to handle it.

    Thanks,
    Shannon Kerr