I'm using bash version 3.0.9 under Centos 7, and I just can't seem to find a combination of escaping that will let me pass single quotes to the out-format parameter. I've tried every combination I think of to wrap the options in single or double quotes, escaping the single ones with backslashes, concatenating strings, passing them in as variables, nothing seems to work. Apparently the command below should work to give me human-readable file sizes, but I just get the single quotes you see in the output:
$ rsync -crthivn --out-format="%n %''l" /from_folder /to_folder
sending incremental file list
test/ %''l
test/file1 %''l
test/folders_current %''l
test/test2/ %''l
test/test2/file2 %''l
sent 191 bytes received 29 bytes 440.00 bytes/sec
I thought that bash escaping would be the root of the problem, but I'm getting the same results when I try with sh and csh. So I'm very confused now! Any help appreciated.