Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Thanks for your reply; I'm getting closer. I'm now using this: rsync -PaSh --stats --delete -e "-i key -p XXXX" "/source/" [email protected]:/destination/ 3>&2 2>&1 1>&3 | tr [:lower:] [:upper:] > output.txt | grep -e 'bytes received' -e 'total bytes' -e files -e 'total file size:' >> output.txt which works in converting stderr to uppercase. Unfortunately I lose the ability to append stdout to the file and instead it just appears on screen. Do I need to add 1> somewhere? Commented Jan 6, 2018 at 16:44
  • @NoExpert You want to save to file the original stdout straight from the rsync command, yes? Commented Jan 6, 2018 at 17:02
  • Only one stream can go through those pipes. You can't have both the tr for the stderr and grep for the stdout in a single command. Commented Jan 6, 2018 at 17:07
  • Yes, after greping what I need, so as in my example in the original above. Thank you. EDIT: OK I've seen your updated answer now. That makes sense. I guess I'll have to live with it. Commented Jan 6, 2018 at 17:08
  • I think you can accomplish what you want if you're willing to use named pipes (FIFOs). I'll post an update to my answer. Commented Jan 6, 2018 at 20:06