Afficher un message
Vieux 14/03/2008, 18h02   #7
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: One file for "stout+sterror" and another for "sterror"; it's possible?

2008-03-14, 14:42(+00), Geoff Clare:
[...]
> Also, this doesn't quite match what the OP asked for, which would be:
>
> $ > out
> $ (echo OUT; sleep 2; echo ERR >&2) 2>&1 >>out | tee err >> out
> $ cat out
> OUT
> ERR
> $ cat err
> ERR


And you can do without opening "out" twice as I already
indicated, which removes the need for opening in append mode:

{ cmd 2>&1 >&3 3>&- | tee err >&3 3>&-; } 3> out


--
Stéphane
  Réponse avec citation
 
Page generated in 0,04310 seconds with 9 queries