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

Re: tee-like file redirection in shell?



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
> 
> You need the multios option set, and I don't recall whether it's the
> default or not (it probably should be).
	it's not set by default, but this does do exactly what i want.

> 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.

	-- sweth.

-- 
Sweth Chandramouli
IS Coordinator, The George Washington University
<sweth@xxxxxxx> / (202) 994 - 8521 (V) / (202) 994 - 0458 (F)
<a href="http://astaroth.nit.gwu.edu/~sweth/disc.html";>*</a>



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