Re: weird behaviour of quotes in dash variable assignments

2020-09-23 Thread David Wright
On Tue 22 Sep 2020 at 13:31:33 (-0400), Gary Dale wrote: > On 2020-09-22 09:29, David Wright wrote: > > On Mon 21 Sep 2020 at 20:50:29 (-0400), Gary Dale wrote: > > > On 2020-09-21 10:30, David Wright wrote: > > > > I think we should apply Hanlon's razor rather than saying the OP lied. > > > > Aft

Re: weird behaviour of quotes in dash variable assignments

2020-09-22 Thread Gary Dale
On 2020-09-22 00:25, David Christensen wrote: On 2020-09-21 18:04, Gary Dale wrote: The two servers are for different customers. I would not want to create a tunnel between them. Instead I have my normal ssh tunnels to each server from my workstation. However the script is only readable by ro

SSH agent forwarding (was: weird behaviour of quotes in dash variable assignments)

2020-09-22 Thread David Christensen
On 2020-09-22 13:05, Gary Dale wrote: On 2020-09-22 00:25, David Christensen wrote: On 2020-09-21 18:04, Gary Dale wrote: The two servers are for different customers. I would not want to create a tunnel between them. Instead I have my normal ssh tunnels to each server from my workstation. How

Re: weird behaviour of quotes in dash variable assignments

2020-09-22 Thread Gary Dale
On 2020-09-22 09:29, David Wright wrote: On Mon 21 Sep 2020 at 20:50:29 (-0400), Gary Dale wrote: On 2020-09-21 10:30, David Wright wrote: On Mon 21 Sep 2020 at 08:18:52 (-0400), Greg Wooledge wrote: On Mon, Sep 21, 2020 at 07:55:45AM -0400, Cindy Sue Causey wrote: '…' and "…" are known as ne

Re: weird behaviour of quotes in dash variable assignments

2020-09-22 Thread David Wright
On Mon 21 Sep 2020 at 20:50:29 (-0400), Gary Dale wrote: > On 2020-09-21 10:30, David Wright wrote: > > On Mon 21 Sep 2020 at 08:18:52 (-0400), Greg Wooledge wrote: > > > On Mon, Sep 21, 2020 at 07:55:45AM -0400, Cindy Sue Causey wrote: > > > > '…' and "…" are known as neutral, vertical, straight,

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Gary Dale
On 2020-09-21 16:18, David Christensen wrote: On 2020-09-21 09:34, Gary Dale wrote: As an FYI, the scripts were the same on both servers because I had ssh sessions on both and copy/pasted the script from one to the other. (cat

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Gary Dale
On 2020-09-21 10:30, David Wright wrote: On Mon 21 Sep 2020 at 08:18:52 (-0400), Greg Wooledge wrote: On Mon, Sep 21, 2020 at 07:55:45AM -0400, Cindy Sue Causey wrote: '…' and "…" are known as neutral, vertical, straight, typewriter, dumb, or ASCII quotation marks. ‘…’ and “…” are known as t

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread David Christensen
On 2020-09-21 18:04, Gary Dale wrote: The two servers are for different customers. I would not want to create a tunnel between them. Instead I have my normal ssh tunnels to each server from my workstation. However the script is only readable by root while my tunnels are for my non-root account

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread David Wright
On Mon 21 Sep 2020 at 12:43:52 (-0400), Greg Wooledge wrote: > On Mon, Sep 21, 2020 at 12:34:20PM -0400, Gary Dale wrote: > > As an FYI, the scripts were the same on both servers because I had ssh > > sessions on both and copy/pasted the script from one to the other. (cat > >

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Gary Dale
On 2020-09-21 13:12, Greg Wooledge wrote: On Mon, Sep 21, 2020 at 12:59:32PM -0400, Gary Dale wrote: Did you try it with Konsole? I got $ hd a   b   61 20 20 20 20 20 20 20  62 0a |a   b.| 000a In other words, konsole *did* alter the contents. Most shells (all that I am

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Gary Dale
On 2020-09-21 12:43, Greg Wooledge wrote: On Mon, Sep 21, 2020 at 12:34:20PM -0400, Gary Dale wrote: As an FYI, the scripts were the same on both servers because I had ssh sessions on both and copy/pasted the script from one to the other. (cat

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Gary Dale
On 2020-09-21 08:18, Greg Wooledge wrote: On Mon, Sep 21, 2020 at 07:55:45AM -0400, Cindy Sue Causey wrote: '…' and "…" are known as neutral, vertical, straight, typewriter, dumb, or ASCII quotation marks. ‘…’ and “…” are known as typographic, curly, curved, book, or smart quotation marks. Y

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Gary Dale
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. Wha

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread David Christensen
On 2020-09-21 09:34, Gary Dale wrote: As an FYI, the scripts were the same on both servers because I had ssh sessions on both and copy/pasted the script from one to the other. (cat

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Greg Wooledge
On Mon, Sep 21, 2020 at 12:59:32PM -0400, Gary Dale wrote: > Did you try it with Konsole? I got > > $ hd > a   b >   61 20 20 20 20 20 20 20  62 0a |a   b.| > 000a In other words, konsole *did* alter the contents. > Most shells (all that I am aware of) treat tabs and blanks a

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Greg Wooledge
On Mon, Sep 21, 2020 at 12:34:20PM -0400, Gary Dale wrote: > As an FYI, the scripts were the same on both servers because I had ssh > sessions on both and copy/pasted the script from one to the other. (cat >

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread David Wright
On Mon 21 Sep 2020 at 08:18:52 (-0400), Greg Wooledge wrote: > On Mon, Sep 21, 2020 at 07:55:45AM -0400, Cindy Sue Causey wrote: > > '…' and "…" are known as neutral, vertical, straight, typewriter, > > dumb, or ASCII quotation marks. > > > > ‘…’ and “…” are known as typographic, curly, curved, bo

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Greg Wooledge
On Mon, Sep 21, 2020 at 07:55:45AM -0400, Cindy Sue Causey wrote: > '…' and "…" are known as neutral, vertical, straight, typewriter, > dumb, or ASCII quotation marks. > > ‘…’ and “…” are known as typographic, curly, curved, book, or smart > quotation marks. Yes. This is one of the possible caus

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Cindy Sue Causey
On 9/21/20, David Christensen wrote: > On 2020-09-20 20:38, David wrote: > >> From the perspective of not knowing how these bash scripts were deployed, >> it's worth confirming that what we are assuming is the "same bash script" >> are >> indeed exactly identical. >> >> $ cmp script1 script2 >> >>

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Greg Wooledge
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

Re: weird behaviour of quotes in dash variable assignments

2020-09-21 Thread Gary Dale
On 2020-09-20 22:55, David Christensen wrote: On 2020-09-20 18:18, Gary Dale wrote: On 2020-09-20 20:36, David Christensen wrote: The environments are identical. Have you tried '#!/bin/sh' ? That's my shebang line. Have you tried single quotes? Wouldn't want to. Single quotes alter

Re: weird behaviour of quotes in dash variable assignments

2020-09-20 Thread Gary Dale
On 2020-09-20 20:36, David Christensen wrote: 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 probl

Re: weird behaviour of quotes in dash variable assignments

2020-09-20 Thread David Christensen
On 2020-09-20 20:52, Gary Dale wrote: On 2020-09-20 22:55, David Christensen wrote: 2020-09-20 19:50:55 dpchrist@tinkywinky ~/sandbox/sh $ cat debian-user-20200920-1727-gary-dale.sh #!/bin/sh doublequote="/root/clamscan-report" echo $doublequote singlequote='/root/clamscan-report' echo $sing

Re: weird behaviour of quotes in dash variable assignments

2020-09-20 Thread David Christensen
On 2020-09-20 20:38, David wrote: From the perspective of not knowing how these bash scripts were deployed, it's worth confirming that what we are assuming is the "same bash script" are indeed exactly identical. $ cmp script1 script2 If somehow the double quotes in the problem script have beco

Re: weird behaviour of quotes in dash variable assignments

2020-09-20 Thread David
On Mon, 21 Sep 2020 at 11:18, 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/clams

Re: weird behaviour of quotes in dash variable assignments

2020-09-20 Thread David Christensen
On 2020-09-20 18:18, Gary Dale wrote: On 2020-09-20 20:36, David Christensen wrote: The environments are identical. Have you tried '#!/bin/sh' ? That's my shebang line. Have you tried single quotes? Wouldn't want to. Single quotes alter the behaviour. Double quotes, single quotes,