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

Re: Ausgabeumleitung funktioniert (mal wieder) nicht



On Nov 09 2005 "Ulrich Fürst" <fuerst.ulrich@vr-web.de> wrote:

> [...]
> Ähnlich sieht's aus mit:
> $ cdrecord dev=ATA:1,1,0 -eject 1>2&>/dev/null
> Bleibt noch
> $ cdrecord dev=ATA:1,1,0 -eject 1>&2>/dev/null
> was zwar keine Dateien anlegt, aber den Output (wie [2] auch nicht
> verhindert. 
>
> Wo liegt hier der Fehler?
>
> [...]

Du bist nahe dran, versuche es mit:

$ cdrecord dev=ATA:1,1,0 -eject >/dev/null 1>&2

Aus der Bash-Manpage:

       [...]
       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.
       [...]

Eventuell benutzt aber cdrecord andere Filedeskriptoren, das lässt sich aber
mit strace -Ffv herausfinden.

Hth -- Peter

-- 
Peter.Weiss@consol.de                         ConSol* Software GmbH
Phone  +49 89 45841-100                       Consulting & Solutions
Mobile +49 177 6040121                        Franziskanerstr. 38
http://www.consol.de                          D-81669 München



Reply to: