Aharon Schkolnik wrote: >> #!/bin/sh >> >> OUTFILE=`mktmp -t quiet.XXXXXXX` >> > > Woudn't it be better to redirect both stdout and stderr to the same file, in > order to maintain the chronological relationship between them ? > You can maintain order of output or the distinction between stderr and stdout, but not both (using this technique). If the former is more important to you than the later, redirect them both into the same file:
just replace: >> if ! "$@" >$OUTFILE.out 2>$OUTFILE.err >> with if ! "$@" >$OUTFILE.out 2>&1 >> then >> cat $OUTFILE.out >> > > If I understand this correctly, you are redirecting the stderr from the cat > command to its stdout. Is that correct, and what you meant ? > > Maybe you meant to redirect the stdout to stderr ? > > cat $OUTFILE.err >&2 > > >> cat $OUTFILE.err 2>&1 >> You are right. My mistake. I direct you to the first line of my original email. Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. Have you backed up today's work? http://www.lingnu.com/backup.html ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
