Caret (^) in CMD.EXE - OS2

This is a discussion on Caret (^) in CMD.EXE - OS2 ; I have just found out that the caret (^) is a metacharacter for CMD.EXE. It appears that its function may be to quote the character that follows it. In any case, *the caret is stripped out of the command line ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Caret (^) in CMD.EXE

  1. Caret (^) in CMD.EXE

    I have just found out that the caret (^) is a metacharacter for
    CMD.EXE. It appears that its function may be to quote the character
    that follows it. In any case, *the caret is stripped out of the
    command line passed to programs*, unless it is represented by two
    carets (^^) or contained in double quotes ("^"). Questions in no
    particular order:
    1. Am I the only one who didn't know this?
    2. Is this documented anywhere?
    3. Am I right that this is its function?
    4. Does 4OS2 behave the same way?
    5. What is the purpose of this?

    Thanks to any and all who can enlighten me.

  2. Re: Caret (^) in CMD.EXE

    On Mon, 7 Jan 2008 13:28:30 UTC, Peter_Flass@yahoo.com wrote:

    > I have just found out that the caret (^) is a metacharacter for
    > CMD.EXE. It appears that its function may be to quote the character
    > that follows it. In any case, *the caret is stripped out of the
    > command line passed to programs*, unless it is represented by two
    > carets (^^) or contained in double quotes ("^"). Questions in no
    > particular order:
    > 1. Am I the only one who didn't know this?
    > 2. Is this documented anywhere?
    > 3. Am I right that this is its function?
    > 4. Does 4OS2 behave the same way?
    > 5. What is the purpose of this?
    >
    > Thanks to any and all who can enlighten me.


    See here:

    http://www.tavi.co.uk/os2pages/cmd.html

  3. Re: Caret (^) in CMD.EXE

    Peter_Flass@yahoo.com schrieb:
    > I have just found out that the caret (^) is a metacharacter for
    > CMD.EXE. It appears that its function may be to quote the character
    > that follows it. In any case, *the caret is stripped out of the
    > command line passed to programs*, unless it is represented by two
    > carets (^^) or contained in double quotes ("^"). Questions in no
    > particular order:
    > 1. Am I the only one who didn't know this?


    I guess no.

    > 2. Is this documented anywhere?


    Yes.

    > 3. Am I right that this is its function?


    It works as designed.

    > 4. Does 4OS2 behave the same way?


    Don't know.

    > 5. What is the purpose of this?


    Pass '>', '<', '|', '&' or other meta characters to an application.


    Marcel

  4. Re: Caret (^) in CMD.EXE

    Peter_Flass@yahoo.com schrieb:
    > I have just found out that the caret (^) is a metacharacter for
    > CMD.EXE. It appears that its function may be to quote the character
    > that follows it. In any case, *the caret is stripped out of the
    > command line passed to programs*, unless it is represented by two
    > carets (^^) or contained in double quotes ("^"). Questions in no
    > particular order:
    > 1. Am I the only one who didn't know this?
    > 2. Is this documented anywhere?
    > 3. Am I right that this is its function?
    > 4. Does 4OS2 behave the same way?
    > 5. What is the purpose of this?
    >
    > Thanks to any and all who can enlighten me.


    The caret is a special character even for DOS and Windows XP with
    exactly the same behaviour.

    Lars

+ Reply to Thread