Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #227273

Re: weird behaviour of quotes in dash variable assignments

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: weird behaviour of quotes in dash variable assignments
Date 2020-09-23 17:50 +0200
Message-ID <ASfbQ-86q-13@gated-at.bofh.it> (permalink)
References (5 earlier) <ARsXw-4qm-7@gated-at.bofh.it> <ARv90-5Kl-9@gated-at.bofh.it> <AREOZ-32n-3@gated-at.bofh.it> <ARQGt-1RS-1@gated-at.bofh.it> <ARUqK-46A-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
> > > > After all, "compare" means diff or cmp to us, whereas many might just
> > > > use their eyeballs. And we all know that authors are the worst people
> > > > to check their own work. Proof-reading is a special skill.
> > > > 
> > > > Even their fix is poorly described. Did they just type the quotes back
> > > > in with an editor, in which case there's no guarantee that the scripts
> > > > are identical between machines, or did they transfer a working script
> > > > to the failing machine? The best line is save until last: "I certainly
> > > > didn't update anything on either server...". Well, yes, that's
> > > > *precisely* what you did: you updated the script.
> >                                ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
> > > You are taking my quote out of context. I didn't change anything on
> > > the server to make the script start working. I updated the script to
> >                                                 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
> > > see if it would work after trying Greg's test. There were no program
> > > or setting updates on the server, and certainly nothing that updated
> > > dash. This is Debian/Stable we're talking about, after all.
> > Sorry, I thought you wrote that on Sunday afternoon, "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."
> > Then on Sunday evening, you wrote "When I retried my script with the
> > quotes, it started working."
> > 
> > The general opinion is that the script was faulty, probably in the
> > quotes used. The narrative says that you removed the quotes, and
> > later put them back. It seems fair to suggest that the quotes you
> > put back were not the same ones that you removed. They were replaced
> > in the same location, but you didn't put the old (removed) quotes
> > into a little two-character file, so that you could put precisely
> > the same ones back into the script, did you?
> I thought about that but then there would be no way I could
> demonstrate it other than what I did - post the offending line via cut
> & paste, a method people have been arguing can change the quotes.
> > 
> > > Since it is a file server, there probably were changes to the files on
> > > its shares, but I'd hardly count that as an "update". Similarly, it
> > > was running cron jobs for backups and virus scans (unsuccessfully) but
> > > again I wouldn't call those "updates".
> > Nor I. No, I'm only talking about your script. Does it bear any
> > relation to the one posted in your blog? The first line (after
> > the shebang) of the one in the blog is the same line that's under
> > discussion here, and has curly quotes. I can't parse the second
> > line's curly quotes, and the fourth line uses an n-dash for a
> > hyphen *though the other hyphens are ok). The fifth line uses
> > curly single-quotes. More curly quotes follow.
> > 
> > I don't see any cause for our wasting time pondering on dash
> > without your posting an MWE that unambiguously demonstrates a
> > problem.
> Yes, that's the script - copy-pasted from the working server then with
> the e-mail addresses changed (they are actually parameters to the
> working script, but why complicate things when explaining a basic
> script). As you noted, it has changed things - hopefully not to the
> point that people won't be able to make it work. I haven't found a way
> to stop Wordpress from doing the substitution but I note the raw text
> is still correct (once you remove the html).

That I can believe. The substitutions appear to be systematic,
<non-space><quote> → 99-style, and <space><quote> → 66-style,
-- → n-dash, --- → m-dash; I think that covers it. And that might be
something you cannot change: I see it converts your apostrophes
in running text too.

But I don't see why you can't post emails with unadulterated
characters. You can obviously read and copy the working script
yourself, so you can at least paste it into a file on your
email computer, using   cat >file   if necessary¹, and then
InsertFile the file into your email composer. Your running text
has ASCII quotes, after all. That should avoid any problem like
https://lists.debian.org/debian-user/2020/09/msg00677.html
where your script fragment *still* has curly quotes but your
speech marks are ASCII.

I think it's reasonable, when you're reporting non-identical
behaviour from supposedly identical systems, to expect some
demonstration that the test cases and the reporting thereof
are, in fact, using identical scripts before eliminating
them from consideration.

¹ Run md5sum, as suggested earlier, on this file, the servers'
  scripts, and any cut-down versions, to demonstrate they're
  all the same. This avoids transferring files.

Cheers,
David.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

weird behaviour of quotes in bash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 00:10 +0200
  Re: weird behaviour of quotes in bash variable assignments The Wanderer <wanderer@fastmail.fm> - 2020-09-21 00:20 +0200
    Re: weird behaviour of quotes in bash variable assignments David Christensen <dpchrist@holgerdanske.com> - 2020-09-21 02:40 +0200
      Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 03:20 +0200
        Re: weird behaviour of quotes in dash variable assignments David Christensen <dpchrist@holgerdanske.com> - 2020-09-21 05:00 +0200
          Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 06:00 +0200
            Re: weird behaviour of quotes in dash variable assignments David Christensen <dpchrist@holgerdanske.com> - 2020-09-21 06:20 +0200
        Re: weird behaviour of quotes in dash variable assignments David <bouncingcats@gmail.com> - 2020-09-21 05:40 +0200
          Re: weird behaviour of quotes in dash variable assignments David Christensen <dpchrist@holgerdanske.com> - 2020-09-21 06:10 +0200
            Re: weird behaviour of quotes in dash variable assignments Cindy Sue Causey <butterflybytes@gmail.com> - 2020-09-21 14:00 +0200
              Re: weird behaviour of quotes in dash variable assignments Greg Wooledge <wooledg@eeg.ccf.org> - 2020-09-21 14:20 +0200
                Re: weird behaviour of quotes in dash variable assignments David Wright <deblis@lionunicorn.co.uk> - 2020-09-21 16:40 +0200
                Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-22 03:00 +0200
                Re: weird behaviour of quotes in dash variable assignments David Wright <deblis@lionunicorn.co.uk> - 2020-09-22 15:40 +0200
                Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-22 19:40 +0200
                Re: weird behaviour of quotes in dash variable assignments David Wright <deblis@lionunicorn.co.uk> - 2020-09-23 17:50 +0200
                Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 18:40 +0200
                Re: weird behaviour of quotes in dash variable assignments Greg Wooledge <wooledg@eeg.ccf.org> - 2020-09-21 18:50 +0200
                Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 19:00 +0200
                Re: weird behaviour of quotes in dash variable assignments Greg Wooledge <wooledg@eeg.ccf.org> - 2020-09-21 19:20 +0200
                Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 20:50 +0200
                Re: weird behaviour of quotes in dash variable assignments David Wright <deblis@lionunicorn.co.uk> - 2020-09-22 02:40 +0200
                Re: weird behaviour of quotes in dash variable assignments David Christensen <dpchrist@holgerdanske.com> - 2020-09-21 22:20 +0200
                Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-22 03:10 +0200
                Re: weird behaviour of quotes in dash variable assignments David Christensen <dpchrist@holgerdanske.com> - 2020-09-22 06:30 +0200
                Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-22 22:10 +0200
                SSH agent forwarding (was: weird behaviour of quotes in dash variable  assignments) David Christensen <dpchrist@holgerdanske.com> - 2020-09-23 00:40 +0200
        Re: weird behaviour of quotes in dash variable assignments Greg Wooledge <wooledg@eeg.ccf.org> - 2020-09-21 14:00 +0200
          Re: weird behaviour of quotes in dash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 18:40 +0200
    Re: weird behaviour of quotes in bash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 03:10 +0200
  Re: weird behaviour of quotes in bash variable assignments <tomas@tuxteam.de> - 2020-09-21 10:00 +0200
    Re: weird behaviour of quotes in bash variable assignments David Christensen <dpchrist@holgerdanske.com> - 2020-09-21 22:20 +0200
      Re: weird behaviour of quotes in bash variable assignments Greg Wooledge <wooledg@eeg.ccf.org> - 2020-09-21 22:30 +0200
        Re: weird behaviour of quotes in bash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-21 23:30 +0200
          Re: weird behaviour of quotes in bash variable assignments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-09-22 07:50 +0200
            Re: weird behaviour of quotes in bash variable assignments Gary Dale <gary@extremeground.com> - 2020-09-22 22:40 +0200
              Re: weird behaviour of quotes in bash variable assignments Greg Wooledge <wooledg@eeg.ccf.org> - 2020-09-22 23:00 +0200
              Re: weird behaviour of quotes in bash variable assignments Andrei POPESCU <andreimpopescu@gmail.com> - 2020-09-23 12:00 +0200

csiph-web