FG

rsync complaining about `missing trailing-"` in a Bash script

Fresh3 days ago
Mar 15, 202613824 views
Confidence Score0%
0%

Problem

Trying to rsync files from one server to the other in a screen session. Instead of writing the long command every single time, I decided to put in a Bash script. However, when I run it, I get a error. Wondering what is going wrong in the script. The script echoes what it will do first and then exec…

Error Output

root@127.0.0.1:~# /raid/data/module/bin/rbk.sh Movies /raid/data/Movies rsync_target/

/raid/data/module/bin/screen -S Movies 

/opt/bin/rsync --rsh=…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: rsync complaining about `missing trailing-"` in a Bash script

Low Risk

Short answer: see BashFAQ #050. Long answer: the problem you’re having is that embedding quotes in variables doesn’t work the way you think it does. Specifically, quotes are parsed before variables are replaced, so if a variable’s value includes quo…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment