Date:Sun, 22 Dec 2024 13:45:19 +1000
From:Martin D Kealey
Message-ID:
| But a nagging question is why does the text contain both ' and "
| characters?
My guess (and that is all it is) is that the answer isn't that it contains
both, but that it might contain eit
Date:Sat, 21 Dec 2024 13:49:48 -0500
From:Greg Wooledge
Message-ID: <20241221184948.gm29...@wooledge.org>
| Choice #2: use $'...' quoting,
| Choice 2 is a bash extension.
No it isn't, or at least not any more. Dollar-Quote quoting (sometimes
called C-stye strin
On Sun, Dec 22, 2024 at 13:45:19 +1000, Martin D Kealey wrote:
> Failing that, by far the "simplest" approach to "literal" text is not to
> have it inside the script, but in a separate file that the script can read.
Yes, this. I omitted this case in my initial reply, thought of it later,
but didn
On Sun, Dec 22, 2024 at 00:49:07 +0700, Budi wrote:
> How is Bash' code to store string of any characters should be containing
> pair of "" and '' at the same time explicitly, being exact verbatim
I'm interpreting this as:
* You would like to store some data in a string variable.
* The data is
On Sat, Dec 21, 2024 at 09:56:15 -0800, Eric Pruitt wrote:
> On Sun, Dec 22, 2024 at 12:49:07AM +0700, Budi wrote:
> > How is Bash' code to store string of any characters should be containing
> > pair of "" and '' at the same time explicitly, being exact verbatim so,
> > ie. cannot be modified, esc
On Sun, Dec 22, 2024 at 12:49:07AM +0700, Budi wrote:
> How is Bash' code to store string of any characters should be containing
> pair of "" and '' at the same time explicitly, being exact verbatim so,
> ie. cannot be modified, escaped or etc, as expected from ordinary/naive
> human writing), into
How is Bash' code to store string of any characters should be containing
pair of "" and '' at the same time explicitly, being exact verbatim so,
ie. cannot be modified, escaped or etc, as expected from ordinary/naive
human writing), into a variable
let, eg., it be
*foo "foo" and 'bar' content*
v=
On Sat, Dec 21, 2024, at 1:52 PM, Greg Wooledge wrote:
> On Sat, Dec 21, 2024 at 09:56:15 -0800, Eric Pruitt wrote:
>> You need to escape one of the types of quotes. Double quotes is
>> generally simpler:
>
> Only in this restricted case. Using double quotes as the outer layer
> means you have to
Date:Sun, 22 Dec 2024 09:39:11 +0700
From:Robert Elz
Message-ID: <10875.1734835...@jacaranda.noi.kre.to>
| Not sure about current bash
I must has been bashed in the brain there, I meant dash,
bash has had this for eons (as have most of the others in
which it works,
On Sun, 22 Dec 2024, 03:49 Budi, wrote:
> How is Bash' code to store string of any characters should be containing
> pair of "" and '' at the same time explicitly, being exact verbatim so,
> ie. cannot be modified, escaped or etc, as expected from ordinary/naive
> human writing), into a variable
Date:Sat, 21 Dec 2024 19:47:31 -0500
From:Greg Wooledge
Message-ID: <20241222004731.go29...@wooledge.org>
| Either way, it's not widespread yet, and one shouldn't expect it to be
| available outside of bash.
If it were only in bash it would never have made it int
On Sun, Dec 22, 2024 at 07:29:14 +0700, Robert Elz wrote:
> Date:Sat, 21 Dec 2024 13:49:48 -0500
> From:Greg Wooledge
> Message-ID: <20241221184948.gm29...@wooledge.org>
>
> | Choice #2: use $'...' quoting,
> | Choice 2 is a bash extension.
>
> No it isn't, or at
12 matches
Mail list logo