[X-Unix] Question about using RsyncX

Albert Lunde atlunde at panix.com
Thu Jan 29 18:06:17 PST 2004


> > > I could redirect the output into a file no problem but don't know how to
> > > "bi-direct" it to screen AND file.  Can anybody tell me how?
> > 
> > $ echo `uname -a` 2>&1 | tee ~/uname.output
> 
> I forgot to mention...the 2>&1 business assumes bash (it's redirecting
> STDERR to STDOUT).

The similar tcsh/csh idiom is:
 
command |& tee ~/uname.output

Another option is (still tcsh):

nohup command >& filename &
tail -f filename

you can control-c out of the tail, or probably even close the terminal
without affecting the "command" process, which is in the background.

bash for the above: 

nohup command 2>&1 filename &
tail -f filename

I write shell scripts that do something like this to a file
named something.$$, echo the name and quit. $$ becomes the pid
which unique enough to prevent overwriting.

Then I cut and past the name into a "tail -f"



More information about the X-Unix mailing list