În data de 18-04-2002, la 17h 49'11", rpetre scria despre "[rlug] Re: Top
pe /dev/tty11":
> Sa mor daca am priceput faza asta cu duplicarea descriptorilor. Adica
> il vars pe 1 aka stdout in dirlist si dupa aia il vars pe 2 aka stderr
> in 1 si merge si daca il pun pe 2 in 1 si dupa aia pe 1 in dirlist nu
> vad stderr ?
>
tot din man bash:
Redirecting Standard Output and Standard Error
Bash allows both the standard output (file descriptor 1)
and the standard error output (file descriptor 2) to be
redirected to the file whose name is the expansion of word
with this construct.
There are two formats for redirecting standard output and
standard error:
&>word
and
>&word
Of the two forms, the first is preferred. This is seman-
tically equivalent to
>word 2>&1
Deci 2>&1 nu inseamna ca il versi pe 2 in 1. 1 si 2 sint "file
descriptor".
Cel mai simplu o faci cu subshell si gata.
( program > stdout ) >& stderr daca le vrei separate sau
program >& stdout daca le vrei impreuna
Mugurel
---
Pentru dezabonare, trimiteti mail la
[EMAIL PROTECTED] cu subiectul 'unsubscribe rlug'.
REGULI, arhive si alte informatii: http://www.lug.ro/mlist/