-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 ]
Kusalananda
  • 333,661
Maxfield
  • 161
  • What are you actually asking? (Please use the {} code button to highlight code that illustrates your question.) – Chris Davies 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 07: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 Says 'Reinstate Monica' Nov 10 '18 at 23:52

1 Answers1

2

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

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

DopeGhoti
  • 76,081