PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Stdout nur halbe Umleitung?



DJ DHG
03-04-2005, 14:18
Moin Moin

Ich habe ein Problem mit der Umleitung vom stdout.
Ich versuche die komplette Ausgabe in eine Datei umzuleiten,
was mir aber nicht gelingen will.


Prometeus:# ./proftpd --configtest 2>&1 temp.txt
Checking syntax of configuration file
Syntax check complete.
Prometeus:# cat temp.txt
Checking syntax of configuration file
Prometeus:#
[...]

Prometeus:# ./proftpd --configtest > temp.txt
Prometeus:# cat temp.txt
Checking syntax of configuration file
Prometeus:#


Wie man sieht, wird nur "Checking syntax of configuration file" umgleitet,
"Syntax check complete." bleibt jedoch auf der Strecke?
Hat jemand eine Idee warum?

mfg DJ DHG

RapidMax
03-04-2005, 16:35
Die Reihenfolge macht's. Siehe auch Manpage von bash.

./proftpd --configtest > temp.txt 2>&1
Gruss, Andy

DJ DHG
03-04-2005, 23:28
Die Reihenfolge macht's. Siehe auch Manpage von bash.

./proftpd --configtest > temp.txt 2>&1
Gruss, Andy

Hi RapidMax, vielen Dank für dein Antwort!
Leider hat sie nicht den gewünschten Erfolg gebracht :(


Prometeus:# ./proftpd --configtest > temp.txt 2>&1
Prometeus:# cat temp.txt
Checking syntax of configuration file
Prometeus:#

mfg DJ DHG

peschmae
04-04-2005, 06:43
Mach mal
blabla &>test.txt
das *sollte* stdout und stderr umleiten (tuts bei mir auch...)

MfG Peschmä

DJ DHG
04-04-2005, 13:29
Mach mal
blabla &>test.txt
das *sollte* stdout und stderr umleiten (tuts bei mir auch...)

MfG Peschmä

Danke für die Antwort, hat aber leider auch nicht funktioniert :mad:


Prometeus:# ./proftpd --configtest &>temp.txt
Prometeus:# cat temp.txt
Checking syntax of configuration file
Prometeus:#

Fals es hilft


djdhg@Prometeus:# bash -version
GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
djdhg@Prometeus:#

peschmae
04-04-2005, 16:44
Bist du sicher dass du auch die Bash verwendest und nicht irgend eine Habakuk-Shell die so Zeichen wie > anders verwendet/ignoriert/wasauchimmer? ;)

Bei mir schreibt übrigens proftpd ausschliesslich auf stdout und nicht auf stderr - da tuts sogar ein > ohne Zauber davor/hinter:


root@thinkpad:~# proftpd --configtest > log
root@thinkpad:~# cat log
Checking syntax of configuration file
root@thinkpad:~# rm log


Ich bin etwas verwirrt...

MfG Peschmä

3qualizer
04-04-2005, 18:47
Nur ein Schuss ins Blaue aber wohlmöglich lässt proftpd bei stdout das nicht auf ein vt geht einfach etwas weg? (Wie's zum Beispiel ls tut indem es die Farben weglässt)