Redirecting output from echo

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
landuchi
Posts: 4
Joined: 26 Jun 2008 15:14

Redirecting output from echo

#1 Post by landuchi » 26 Jun 2008 15:36

I want to redirect the output of echo into a binary and then redirect the output of the binary into a file.

The idea would be something like this:

Code: Select all

echo "query" | binary.exe > output.txt


Code: Select all

echo "select first 1 cod_compra from compras;" | isql -u SYSDBA -p masterkey c:\bases\hsm.gdb > query_result.txt


But i get the following error.
"Expected end of statement, encountered EOF"

I am doing something wrong but i can´t remember what it is. I know this can be done, because i did it before but as the good human i am, i forgot to write it down.

Can you help me out ?
Thanks in advance

Post Reply