Manfred Lotz <manfred.lotz(at)web.de> wrote:
> Oliver Fromme <olli(at)lurza.secnetix.de> wrote:
> > Manfred Lotz <manfred.lotz(at)web.de> wrote:
> > > echo "one important line: $somevar" >> /somepath/mylog
> > > 2>&1
> >
> > Das "2>&1" solltest Du besser weglassen.
>
> Ja klar. echo schreibt ja auch sowieso nur auf stdout.
Nein -- Wenn ein Fehler auftritt, werden diagnostische Mel-
dungen nach stderr geschrieben. Genau das ist der Grund,
weshalb man das "2>&1" weglassen sollte. Sonst wär's ja
egal.
Übrigens ist »echo« mehr oder weniger obsolete. Es wird
empfohlen, für portable Skripte besser »printf« zu verwen-
den.
> > [...]
> > Langer Rede kurzer Sinn: Wenn Deine Zeilen hinreichend
> > kurz sind, gibt es keine Probleme.
>
> Die Zeilen sind kurz, max. 200 Bytes pro Zeile. Dann sollte es also
> gehen.
Ja.
Gruß
Olli
-- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "anyone new to programming should be kept as far from C++ as possible; actually showing the stuff should be considered a criminal offence" -- Jacek Generowicz To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org with "unsubscribe de-bsd-questions" in the body of the messageReceived on Mon 10 Jan 2005 - 11:35:38 CET