1 | #!/bin/bash |
---|
2 | |
---|
3 | REMOTE='moria:~/tmp/rsync-bugtest/sample-data' |
---|
4 | DEST='.' |
---|
5 | |
---|
6 | # Clean up |
---|
7 | rm -rf $DEST/sample-data |
---|
8 | |
---|
9 | echo |
---|
10 | echo "Successful case" |
---|
11 | echo "-------------------" |
---|
12 | rsync -aP $REMOTE $DEST |
---|
13 | |
---|
14 | # Clean up |
---|
15 | rm -rf $DEST/sample-data |
---|
16 | |
---|
17 | echo |
---|
18 | echo "Now the error" |
---|
19 | echo "-------------------" |
---|
20 | rsync -aXP $REMOTE $DEST |
---|
21 | |
---|
22 | |
---|
23 | #rsync $OPTIONS $REMOTE $DEST > >(tee rsync-out.txt) 2> >(tee rsync-errors.txt >&2) |
---|
24 | |
---|
25 | # See stdout+stderr output and split to log files |
---|
26 | # command > >(tee stdout.log) 2> >(tee stderr.log >&2) |
---|
27 | |
---|