What's wrong here?

May 20, 2008
11,385
99
Syracuse, NY, USA
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?
 
May 24, 2010
855
0
Northlake, Il
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.
 
May 20, 2008
11,385
99
Syracuse, NY, USA
I thought that was the first thing I tried and that it failed. I was mistaken. It did work. Thanks!


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.
 
Similar threads
Thread starter Title Forum Replies Date
T @replace -- what is wrong here Support 2
M What am I doing wrong here? Support 2
JohnQSmith New online help file wrong logo Support 7
vefatica @EXECSTR ... TCSTART ... something's wrong! Support 7
R History window wrong size, can't remember size change Support 12
mfarah Fixed The DATE command produces the wrong error message. Support 1
MikeBaas @regsetenv complains "wrong parameter" Support 14
mikea How to? TCC registered to wrong 'entity' Support 5
vefatica Fixed KEYSTACK /i with repeat count sends wrong keys Support 7
C ZIP/U compares wrong timestamp Support 13
vefatica @WORDS, often wrong Support 0
vefatica gcd() ... wrong answer, lcm() hangs Support 5
D What is wrong with this code? Support 7
vefatica WAD DIR /HL still gets names wrong Support 16
H Fixed DIR /G returns wrong sizes Support 2
M Another "What is wrong?" Support 8
M What is wrong with this command? Support 4
vefatica Updater says wrong version Support 1
CWBillow Wrong icons keep sticking Support 6
M How to? What am I doing wrong/not understanding? Support 10
C News link wrong Support 1
M What am I doing wrong? Support 12
C Forum column headings wrong? Support 4
gschizas Installation folder for TCMD x64 15.1 is wrong Support 5
Dan Glynhampton Documentation v15 help: ECHOXERR Help Page Title is Wrong Support 0
M What am I doing wrong in this (very simple!) code? Support 3
vefatica Something wrong with @PID Support 10
J zip wrong central directory signature Support 12
S Fixed _DO_FILES and _DO_DIRS wrong Support 0
B Downloading Updates - Error: Wrong file size?? Support 3
vefatica Wrong startup file? Support 1
M How to? Missing closing quote: What am I doing wrong???? Support 7
gschizas (minor) Help topic "Colors, Color Names and Codes" is wrong Support 0
T Wrong prompt in Windows command console Support 3
M Where am I going wrong with ALIAS??? Support 7
G Wrong File Size Support 8
vefatica Updating v10: error wrong file size Support 2
S Wrong .INI file used by TCC Support 2
K_Meinhard Wrong sender adress Support 0
Joe Caverly Here-Document on new Install Support 21
nikbackm Switch Case and here-document redirection Support 2
J Vers. 18 Here doc redirection broken? Support 4
B Newbie here, I have a question. Support 4
M What's going on here????? Support 6
A Here document Support 3
M Simply put, Help! (I can't figure out what's going on here.) Support 6
Mordachai TCMD Prompt Here?!@ Support 14
K_Meinhard Fixed ? TCMD 14.02 doesn't start here Support 4
vefatica What's happening here? Support 3
Charles Dye Strange output, here-doc redirection, TYPE, //UnicodeOutput=Yes Support 6

Similar threads