Not able to redirect output of command

Hi All,.
We are using AIX as the OS to host the Oracle ERP. We have a command FNDLOAD which is used to load setups. When this command is run, it outputs names of log files and any errors to the screen.

I am trying to redirect this output to a file because we have large number of these commands running from a script and would like to log them.

I can redirect normal echo commands to a file without a problem, but the output of this command is not getting redirected.

I tried >, >>, |, | tee till now. None of it works. Any solution?

I think FNDLOAD is an Oracle command, that accepts many optional statements.
Can you show an example of your usage of the command?

1 Like

Command example:

 
FNDLOAD apps/apps_pwd 0 Y UPLOAD $FND_TOP/patch/115/import/afcppinf.lct XXVTV_OUTPUT_FILE_OPNS_printer_def.ldt 

Output is like

 
Log filename : L671819.log

Report filename : O671819.out

My guess would be that it's writing on stderr and not stdout. If that's correct, then all of your redirection attempts have focused on the wrong stream.

Regards,
Alister

1 Like

I see that it is posting output to STDERR and i know how to redirect the whole programs output to a file. But then the echo commands from the shell script is also going off screen.

---------- Post updated at 11:57 AM ---------- Previous update was at 11:56 AM ----------

My code sample:

 
 
echo Loading Alert...
FNDLOAD apps/$apps_pwd 0 Y UPLOAD $ALR_TOP/patch/115/import/alr.lct VANTIV_OUTPUT_FILE_OPTIONS_ALR.ldt
echo Completed Moving Alert.