On 2020-09-21 07:51, Greg Wooledge wrote:
On Sun, Sep 20, 2020 at 09:18:33PM -0400, Gary Dale wrote:
The line causing the problem reads: report="/root/clamscan-report"
There is nothing wrong with that alleged line.
There is an incredible lack of openness and forthrightness in this
thread. What are you hiding? Why are you hiding it?
Nothing. Just not sharing extraneous details.
Have you tried single quotes?
Wouldn't want to. Single quotes alter the behaviour.
False. Either type of quotes is perfectly fine in this case.
The key words being "in this case". As I explained elsewhere in this
thread, I avoid using single-quotes except when I need them. Otherwise
anyone reading the script wouldn't know if the single quotes were needed
or not. This is fairly standard practise, as far as I've seen, when
writing scripts.
The fact that you make this claim tells me one of the following two
things is true:
* You have no idea what you're doing, and you are GUESSING that
changing the quotes would cause an issue, but you did not actually
try it.
* The whole discussion is founded on falsehoods. There's something
you're not telling us. The "line" in question is falsified, or it's
part of some larger context which is being hidden, and this context
is vitally important to understanding the problem.
I'm leaning toward the latter.
What you should do is produce the smallest possible script that still
exhibits the problem, and post that script, plus its output. Obviously
you'd add something like echo "$report" to the script. Even better
would be printf '%s\n' "$report" . Better still would be
printf %s "$report" | hd . Or you could just add set -x to the script.
The smallest possible script was what I posted - the single line copied
and pasted from the script it was running in. It was the first line
after the shebang.