weird behaviour of quotes in bash variable assignments
I have the same bash script on two different Debian/Buster AMD64
servers. However on one it refused to run. I tracked it down quickly to
a variable substitution problem.
The line causing the problem reads: report="/root/clamscan-report"
On one server echo $report prints /root/clamscan-report while on the
other it prints "/root/clamscan-report".
Needless to say clamscan can't print to the latter. I fixed it by
removing the quotes on the one server but now the scripts are different
between the two servers, which isn't what I want. More importantly, I
don't understand why it refuses to remove the quotes.
Where does this behaviour (keeping the quotes) get set?
Reply to: