stderr in eine datei umleiten

ydab

Member
Tach,

ich versuche die Ausgaben eines Progs in eine Datei umleiten, nur landen leider die stderr-Ausgaben aber trotzdem auf dem Bildshirm.

prog 1>&2>datei klappt nicht.

wie kriegt man es hin?

mfg
YDAB
 
Welche Shell benutzt du denn? Hier mal ein Auszug aus der Man-Page der Bash:

Code:
       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.
 
Zurück
Oben