Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: tee-like file redirection in shell?



Sweth Chandramouli <sweth@xxxxxxxxxxxxxxxxxxxx> typed:
:On Wed, Jun 09, 1999 at 08:16:39PM +0100, Bruce Stephens wrote:
:> Sweth Chandramouli <sweth@xxxxxxxxxxxxxxxxxxxx> writes:
:> > 	is there currently some way to reproduce the effect of
:> > the tee command in the shell itself,
:> Yes.  This works for me:
:>         % ps > some_file | cat
:> Is there any nicer way to say "save to a file and show the results"
:> than using the ugly "| cat"?
:	i don't know that it's particularly nicer, but something like
:% ps > some_file > /dev/stdout
:	should at least save a process from being spawned.

% ps >&1 >some_file

NB: take care with the order, it's not
% ps >some_file >&1

Regards,
-- 
Geoff Wing   <gcw@xxxxxxxxx>            Mobile : (Australia) 0413 431 874
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/



Messages sorted by: Reverse Date, Date, Thread, Author