On Sat, Jun 12, 2010 at 17:32, George Sebastian <[email protected]>wrote:

> To redirect error do 2>
> So, if you want your output to go into file output_file and error to
> go into error_file, do
> $ ./bash_file >output_file 2>error_file
>

redirect to separate err and o/p files
prog_name >out_file 2>err_file

redirect err and o/p to same o/p files
prog_name >out_file 2>&1

redirect err and o/p to same o/p files and also to console
prog_name 2>&1 |tee out_file | gawk '{print $0}'


>
> On Jun 12, 3:58 pm, kapil jain <[email protected]> wrote:
> > On Sat, Jun 12, 2010 at 3:21 AM, ANKIT <[email protected]> wrote:
> > > i have a error displayed on terminal after running a bash file
> > > the error is so long that i cannot see it from beginning
> >
> > > is there a way to send the terminal o/p or error to a file so that i
> > > can see it from beginning.
> >
> > $./bash_file >file_name
> >
> >
> >
> > > --
> > > l...@iitd -http://tinyurl.com/ycueutm
> >
> > --
> > ___________________________________
> >
> > Kapil Kumar Jain
> >
> > 7th Semester Student
> > Department Of Computer Science & Engg.
> > NIT Durgapur,W.B.
>
> --
> l...@iitd - http://tinyurl.com/ycueutm
>



-- 
Lots o' Luv,
Phani Bhushan

Let not your sense of morals prevent you from doing what is right - Isaac
Asimov (Salvor Hardin in Foundation and Empire)

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

-- 
l...@iitd - http://tinyurl.com/ycueutm

Reply via email to