it doesn't work. I'm trying with following line:
rsync -azIcr -b --backup-dir="$HISTORICDIR
SERVER_SVN/ $JBOSS_USER@$jboss_serv:$J
> $DEPLOYCENTERDIR/builds/$E
But with no luck :(
Main Topics
Browse All Topicshi!
i'm developing a little script that does a lot of things, and i've encountered one problem:
I need to append stdout and stderr from this rsync line:
rsync -azIcr -b --backup-dir="$HISTORICDIR
Note that this rsync line is already redirected to $PUSHDIFFS_$jboss_serv file and i want to log the result of this line to another existing log file. f.ex.: rsync ... ... ... > /tmp/doh.log >> existing.log 2>&1 (i've tried this one, but it doesn't work),
Thanks in advance!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
it doesn't work. I'm trying with following line:
rsync -azIcr -b --backup-dir="$HISTORICDIR
SERVER_SVN/ $JBOSS_USER@$jboss_serv:$J
> $DEPLOYCENTERDIR/builds/$E
But with no luck :(
What exactly doesn't work?
Do you see the output in only one of the logs (if yes, which one?), or in neither of the two?
Do you see output on the screen?
Any error messages?
There must not be an intervening space between the two ">>" . Your post is not clear in that case.
Do you get output when omitting the redirection completely (i.e. anything following "grep -v ^$") ?
What do you want to do with stderr?
i want the output in both files, but it'll append stdout to $DEPLOYCENTERDIR/builds/$E
When i omitted redirection, it returned to me rsync differences between two servers, exactly what i need to append at both files.
Appending stderr is optional for me.
Thanks for your patience!
OK, no problem.
Seems that you want to append to both files.
Without stderr please use
rsync ... ... | tee -a $PUSHDIFFS_$jboss_serv >> $DEPLOYCENTERDIR/builds/$E
Inc
rsync ... ... 2>&1 | tee -a $PUSHDIFFS_$jboss_serv >> $DEPLOYCENTERDIR/builds/$E
Business Accounts
Answer for Membership
by: woolmilkporcPosted on 2009-09-08 at 08:28:56ID: 25282884
Hi,
please try rsync .... | tee $PUSHDIFFS_$jboss_serv >> existing.log
and to have also stderr in existing.log but not in $PUSHDIFFS....
rsync .... 2>>existing.log | tee $PUSHDIFFS_$jboss_serv >> existing.log