Re: weird behaviour of quotes in bash variable assignments

2020-09-23 Thread Andrei POPESCU
On Ma, 22 sep 20, 16:37:40, Gary Dale wrote: > > Your first point makes it impossible for me to present anything because this > list doesn't (AFAIK) allow attachments. This is a myth, I just attached a small script to this message. The list apparently does indeed filter some attachments most lik

Re: weird behaviour of quotes in bash variable assignments

2020-09-22 Thread Gary Dale
On 2020-09-22 01:48, Andrei POPESCU wrote: On Lu, 21 sep 20, 17:22:26, Gary Dale wrote: I presented the line that failed, copied and pasted from the Konsole session. What more do you want, other than to complain? In such cases it is best to attach[1] the smallest complete[2] script demonstratin

Re: weird behaviour of quotes in bash variable assignments

2020-09-22 Thread Greg Wooledge
On Tue, Sep 22, 2020 at 04:37:40PM -0400, Gary Dale wrote: > The smallest complete script then is > > report=”/root/clamscan-report” > echo $report There are three errors in this script. 1) There is no shebang line. 2) You've got curly quotes instead of ASCII double-quotes. 3) You used a variabl

Re: weird behaviour of quotes in bash variable assignments

2020-09-21 Thread Andrei POPESCU
On Lu, 21 sep 20, 17:22:26, Gary Dale wrote: > > I presented the line that failed, copied and pasted from the Konsole > session. What more do you want, other than to complain? In such cases it is best to attach[1] the smallest complete[2] script demonstrating the behaviour. Based on the informa

Re: weird behaviour of quotes in bash variable assignments

2020-09-21 Thread Gary Dale
On 2020-09-21 16:28, Greg Wooledge wrote: On Mon, Sep 21, 2020 at 01:19:22PM -0700, David Christensen wrote: On 2020-09-21 00:52, to...@tuxteam.de wrote: What does the builtin "shopt" say? Especially the value of `compat42' is involved in quote removal. Joy! Joy! Happy! Happy! Another whole

Re: weird behaviour of quotes in bash variable assignments

2020-09-21 Thread Greg Wooledge
On Mon, Sep 21, 2020 at 01:19:22PM -0700, David Christensen wrote: > On 2020-09-21 00:52, to...@tuxteam.de wrote: > > What does the builtin "shopt" say? Especially the value of `compat42' > > is involved in quote removal. > > Joy! Joy! Happy! Happy! Another whole dimension for potential problems!

Re: weird behaviour of quotes in bash variable assignments

2020-09-21 Thread David Christensen
On 2020-09-21 00:52, to...@tuxteam.de wrote: On Sun, Sep 20, 2020 at 05:27:49PM -0400, Gary Dale wrote: Where does this behaviour (keeping the quotes) get set? What does the builtin "shopt" say? Especially the value of `compat42' is involved in quote removal. Joy! Joy! Happy! Happy! Anoth

Re: weird behaviour of quotes in bash variable assignments

2020-09-21 Thread tomas
On Sun, Sep 20, 2020 at 05:27:49PM -0400, Gary Dale wrote: > 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-

Re: weird behaviour of quotes in bash variable assignments

2020-09-20 Thread Gary Dale
On 2020-09-20 18:14, The Wanderer wrote: On 2020-09-20 at 17:27, Gary Dale wrote: 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

Re: weird behaviour of quotes in bash variable assignments

2020-09-20 Thread David Christensen
On 2020-09-20 15:14, The Wanderer wrote: On 2020-09-20 at 17:27, Gary Dale wrote: 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

Re: weird behaviour of quotes in bash variable assignments

2020-09-20 Thread The Wanderer
On 2020-09-20 at 17:27, Gary Dale wrote: > 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