We have an application here that does some table queries and then prints the result on screen. I do not have the code of this application (which i will just call "queryCommand"), but what it does is that you call it with some parameters and it prints some info about the query and then the registries that it gets. I need to print the results of this command on a file. I have tried:
queryCommand [parameters] > file.txt
But what happens is that I get the query info on the file, but all the registries that come after are still printed on screen and not in the file. As I said, I don't have the code of this "queryCommand" so i don't know what it does to print results. If anyone could help me i would appreciate it. Thanks in advance.
If you already are in a prompt of a program (like in sqlplus, or like in a debugger gdb, ...) maybe you should get a manual of the available command line : they may be some specific instruction to enter (like spool name .... spool off in sqlplus) to generate the expected log file.
Edit: nvm i looked it up, so i guess the application is throwing the registries on the standard error stream (kinda odd) and you merged them both with the 2>&1. Thanks again.