shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redirecionamento de erro


From: César A . K . Grossmann
Subject: Re: Redirecionamento de erro
Date: Sun, 17 Aug 2003 02:17:32 -0000
User-agent: eGroups-EW/0.82

--- Em address@hidden, Rodrigo Schmitz Guarilha Costa
<rodrigo.costa@t...> escreveu
> Pessoal,
> 
> Sabem como faço para redirecionar a resposta de erro de um comando
para um
> arquivo?
> Eu estava executando o seguinte exemplo:
> 
> /usr/teste/admin > /usr/teste/exec.ok 2> /usr/teste/exec.err

Da página man do bash:

(...)
       Note  that  the order of redirections is significant.  For
       example, the command

              ls > dirlist 2>&1

       directs both standard output and  standard  error  to  the
       file dirlist, while the command

              ls 2>&1 > dirlist

       directs  only the standard output to file dirlist, because
       the standard  error  was  duplicated  as  standard  output
       before the standard output was redirected to dirlist.
(...)

Acho que deve ser de utilidade...

[]s
--
Cesar A. K. Grossmann
http://www.LinuxByGrossmann.cjb.net/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]