On Mon, Sep 30, 2013 at 05:34:11PM +0800, Jay Amorin wrote:
> Replacing with 2>&1 won't help I think as I also need to save the
> output of svnadmin
> dump to /srv/my_repo.1-100.dump.

I see. I didn't notice the ".dump/.log" file extension differences,
and I think the "I want to store the output (standard out/error) to a
log file" also threw me.

So if I understand correctly this time, standard output contains the
actual dump to be saved, and the "Dumped revision 0..." text is
standard error which is to go to a separate log file as well as
displayed? If so, maybe try:

svnadmin dump -r1:100 --incremental /srv/my_repo 2>&1 1>/srv/my_repo.1-100.dump 
| tee /srv/my_repo.1-100.log

So now 2>&1 is saying "standard error goes to wherever standard output
is currently pointing" but then changing the actual standard output to
be directed to your dump file (which shouldn't capture stderr). Then,
the only thing left for the pipe operator to capture is the svnadmin
stderr.

Here's my example test:

abolte@ettin:~$ cat test.sh 
#!/bin/bash
echo Standard outout
echo Standard error >&2
abolte@ettin:~$ ./test.sh 2>&1 1>output | tee output-error
Standard error
abolte@ettin:~$ cat output-error 
Standard error
abolte@ettin:~$ cat output
Standard outout
abolte@ettin:~$ 


-Adam

Attachment: signature.asc
Description: Digital signature

_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to