On Sun, 11 Oct 2009 23:36:52 +0200, Stefan Miklosovic 
<miklosovic.free...@gmail.com> wrote:
> hi list,
> if error output of some program appear on screen,
> it is possible to print it also to some file simultaneously ?
> e.g
> if I "cat" file which do not exist, error is on screen,
> I want to add that error to some file (errors.txt)

See "man sh" (or "man bash" if you use it): The redirection
could be this:

        $ cat nonexist.txt > error.txt 2>&1

The C shell has a different syntax:

        % cat nonexist.txt >& error.txt

I hope that's what you have requested. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to