On Wed, 13 Apr 2005 16:34:43 +0200 Vincenzo Ciancia <[EMAIL PROTECTED]> wrote:
> "Note that the order of redirections is significant. For example, the
> command
>
> ls > dirlist 2>&1
>
> directs both standard output (file descriptor 1) and standard error (file
> descriptor 2) 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."
>
"redirige solo lo stdout al file dirlist, perch� lo stderr
� stato duplicato nello stdout prima che lo stdout fosse rediretto
a dirlist."
(immagino che non fosse la traduzione il problema.)
Non c'� molto da aggiungere, � un po' misteriosa come spiegazione per�
� corretta (non sono un' esperto di bash).
Chiaramente per capire dovresti fare delle prove ma il comando nell' esempio
non va bene. Hai 2 possibilit�:
1) Forzi l' errore con ls in modo che stampi qualcosa sullo stderr, per es.:
ls /dsadsafas
2) Usi un comando che redirige contemporaneamente qualcosa sullo stdout e
sullo stderr, come ad esempio mplayer, anche transcode mi sembra. Ce ne saranno
sicuramente molti altri.
Io proverei con 2).
--
Saluti
Mattia
pgpjnQ153kDLj.pgp
Description: PGP signature

