Skip to content

Commit

Permalink
Remove unneeded quotes
Browse files Browse the repository at this point in the history
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
  • Loading branch information
Richienb committed Mar 30, 2020
1 parent cb67fab commit 2b1d1c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion b/bash.bash
@@ -1,3 +1,3 @@
#!/bin/bash

echo "Hello World"
echo Hello World

1 comment on commit 2b1d1c9

@xavery
Copy link

@xavery xavery commented on 2b1d1c9 Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These quotes are in fact needed, even though the result is exactly the same. In the current version, you're passing two arguments to the echo command : Hello and World. In the previous version, the only argument of the command was Hello World, which is what was really meant by the programmer.
In this particular example, this makes no difference whatsoever, but the underlying topic of quoting in Bash (also see here for more advanced examples) is much more complex.

Please sign in to comment.