1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What's wrong here?

Discussion in 'Support' started by vefatica, Jun 4, 2012.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,794
    Likes Received:
    29
    This command (below) works correctly, sending the appropriate data to stdout.
    Code:
    g:\gnu\cut.exe -f1,2,5 -d , IpToCountry.csv | g:\gnu\tr.exe -d \"
    But when I add " > file" to that command, TCC doesn't recognize the redirection and passes the tail to tr.exe. How can I fix that?
     
  2. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Vince, I I was pretty sure I had the answer you were looking for, but I wrote a 5-minute C++ program that did nothing more than dump its parameters, and my suspicion of what would work was very easy and absolutely correct. Specifically, /^" (assuming that the caret is your escape character). Without the caret, I get:
    Code:
    [D:\Dump Parameters\Debug]DumpParameters abc \" >DumpParameters.txt
    0: DumpParameters
    1: abc
    2: "
    3: >DumpParameters.txt
    
    with the caret I get:
    Code:
    [D:\Dump Parameters\Debug]DumpParameters abc \^" >DumpParameters.txt
     
    [D:\Dump Parameters\Debug]type DumpParameters.txt
    0: DumpParameters
    1: abc
    2: "
     
    [D:\Dump Parameters\Debug]
    
    which, I would guess, is exactly what you were hoping to get.
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,794
    Likes Received:
    29
    I thought that was the first thing I tried and that it failed. I was mistaken. It did work. Thanks!


     

Share This Page