Operating System - HP-UX
1751720 Members
4056 Online
108781 Solutions
New Discussion юеВ

Re: File output redirection

 
SOLVED
Go to solution
PING_6
Esteemed Contributor

File output redirection

Hi Champs,

Is there a way to redirect STDERR to one file & STDOUT to another file using file redirection option

TIA
Whatever exists is changeable and what is not changeable does not exist.
3 REPLIES 3
Pete Randall
Outstanding Contributor
Solution

Re: File output redirection

Sure.

yourcommand 1>outfile 2>errorfile

example:

cat /etc/passwd 1>outfile 2>errorfile


Pete

Pete
Venkatesh BL
Honored Contributor

Re: File output redirection

# ./command 1> file_output 2> file_err
PING_6
Esteemed Contributor

Re: File output redirection

Hi Experts,

Thanks for your quick response.
Whatever exists is changeable and what is not changeable does not exist.