-3

How are they different?

I am using the [ command. I know we need a space after [ and before ], and that the test command is equivalent. But I can't find any information about the difference between the expressions

  • [ abc=10 ] and
  • [ abc = 10 ]

closed as unclear what you're asking by Ipor Sircer, roaima, thrig, ilkkachu, Stephen Rauch Nov 13 '17 at 23:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What are you actually asking? (Please use the {} code button to highlight code that illustrates your question.) – roaima Nov 13 '17 at 22:43
  • 1
    Is that an en dash? And not even an ASCII hyphen? Is that the name of some command or what is it supposed to be? – ilkkachu Nov 13 '17 at 23:03
  • For starters, – abc=10 is two words and – abc = 10 is four words. If passed to a command, the former results in two arguments and the latter results in four arguments. – AlexP Nov 14 '17 at 7:36
  • I believe that it’s clear what the question is asking  —  but isn’t this a duplicate of, like, 42 other questions? – G-Man Nov 10 '18 at 23:52
2

abc=10 will set the variable abc equal to 10.

abc = 10 will execute abc with parameters = and 10.

  • 2
    Not within [...], which is what I believe the user means, judging from the title. – Kusalananda Nov 10 '18 at 22:52
  • To be fair,  there were no brackets in the title  when this answer was posted. – G-Man Nov 10 '18 at 23:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.