1752782 Members
6453 Online
108789 Solutions
New Discussion

stdio redirection

 
Subhash Kumar
Occasional Contributor

stdio redirection

Hi,

a simple doubt, i would like to redirect the output of a command to a file.

opcragt -all > test-file
but it send the errors to screen itself.

the errors and command output should goto the same file. any ideas?

thanks...
1 REPLY 1
James R. Ferguson
Acclaimed Contributor

Re: stdio redirection

Hi:

opcragt -all > test-file 2>&1

See the manpages for 'sh-posix'.

Regards!

...JRF...