Skip to main content
deleted 17 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

As in the title, isIs there any reason for doing something like:

a="abc"

or

a='abc'

The quotes seem completely superfluous, but then there might be some hideous corner case... I'm interested in Bash and Sh in particular, but answer about the other ones as well if you can and will.

As in the title, is there any reason for doing something like:

a="abc"

or

a='abc'

The quotes seem completely superfluous, but then there might be some hideous corner case... I'm interested in Bash and Sh in particular, but answer about the other ones as well if you can and will.

Is there any reason for doing something like:

a="abc"

or

a='abc'

The quotes seem completely superfluous, but then there might be some hideous corner case... I'm interested in Bash and Sh in particular, but answer about the other ones as well if you can and will.

Post Closed as "Duplicate" by Jeff Schaller, Kusalananda bash
Source Link
user147505
user147505

Is there any point in quoting simple strings?

As in the title, is there any reason for doing something like:

a="abc"

or

a='abc'

The quotes seem completely superfluous, but then there might be some hideous corner case... I'm interested in Bash and Sh in particular, but answer about the other ones as well if you can and will.