SZÉPE Viktor <[email protected]> wrote:
|Idézem/Quoting Steffen Nurpmeso <[email protected]>:
|> SZÉPE Viktor <[email protected]> wrote:
|>|Idézem/Quoting Ralph Corderoy <[email protected]>:
|>|> Hi Viktor,
...
|>|>>> The interpretation of a <backslash> followed by any other
|>|>>> sequence of characters is unspecified.
...
|>|>>> Without it, I get consistent results.
...
|>|>> Using b/dash -c ".." to switch shell is very misleading. Inside
|>|>> double-quotes escaped characters loose their backslashes!
|>|>
|>|> Well, that's not quite true, as I showed above.
|>|
|>|Yes. In single quotes a double quote should not be escaped.
|>
|> Yes, like i said. My fault anyway. The rules of the shell appear
|> inconsistent to me, sometimes, it is even worse inside ${}
|> constructs and especially so if quoting is involved inside there
|> in addition. There are also i think still open POSIX standard
|> issues related these things. I would claim that only very few
|> people get that right right away, and to me the question would be
|> how many of those in fact reveal indeed the outcoming of
|> "addictive behaviour". To me: these rules are sick. But because
|> of historical reasons, of course, of course. I do not accuse
|> anybody. Nonetheless of know of my weaknesses regarding those
|> rules and should avoid running into those traps, but did not.
|> Quite honestly, all that a pain in the a.s.:
...
|> ?0[wales]$ bash -c "echo a\\\ b"
|> a\ b
|> ?0[wales]$ bash -c "echo 'a\\\ b'"
|> a\\ b
...
|> ?0[wales]$ mksh -c "echo a\\\ b"
|> a\ b
|> ?0[wales]$ mksh -c "echo 'a\\\ b'"
|> a\ b
|
|For more than a year now I use shellcheck for all my scripts.
|https://github.com/szepeviktor/debian-server-tools/search?l=shell
|
|I suggest you to make the script/s shellcheck-free.
Yah, hm, thanks for the suggestion, why not :).
Then again:
$ pacman -S shellcheck
resolving dependencies...
looking for conflicting packages...
Packages (13) ghc-8.0.2-3 haskell-json-0.9.1-8 haskell-mtl-2.2.1-7
haskell-parsec-3.1.11-4 haskell-primitive-0.6.2.0-2
haskell-quickcheck-2.10.0.1-1 haskell-random-1.1-7
haskell-regex-base-0.93.2-27 haskell-regex-tdfa-1.2.2-5
haskell-syb-0.7-1 haskell-text-1.2.2.2-2
haskell-tf-random-0.5-11 shellcheck-0.4.6-6
Total Download Size: 45.71 MiB
Total Installed Size: 468.23 MiB
:: Proceed with installation? [Y/n] n
Nah, the problems as such are pretty well understood, i just
sometimes forget about them.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)