Skip to main content
added 37 characters in body
Source Link
Vlastimil Burián
  • 31.1k
  • 66
  • 209
  • 358

Syntax highlighting is one problem

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

 

Missing double quotes are a bigger problem

What should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use Google.


PS: Or see below.

Always pipe your scripts to ShellCheck


PPS:

Double quote to prevent globbing and word splitting

For shell script writers, nano editor is hardly usable, because it won't recognize variables from inside string (quotes), which is very bad for every shell script writer. Double quotes are completely essential in shell scripts. They prevent so called globbing and word splitting, read ShellCheck Wiki article SC2086 for more information about this topic.


Always pipe your scripts to ShellCheck

Syntax highlighting is one problem

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

Missing double quotes are a bigger problem

What should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use Google.


PS:

Always pipe your scripts to ShellCheck


PPS:

Double quote to prevent globbing and word splitting

For shell script writers, nano editor is hardly usable, because it won't recognize variables from inside string (quotes), which is very bad for every shell script writer. Double quotes are completely essential in shell scripts. They prevent so called globbing and word splitting, read ShellCheck Wiki article SC2086 for more information about this topic.

Syntax highlighting is one problem

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

 

Missing double quotes are a bigger problem

What should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use Google. Or see below.


Double quote to prevent globbing and word splitting

For shell script writers, nano editor is hardly usable, because it won't recognize variables from inside string (quotes), which is very bad for every shell script writer. Double quotes are completely essential in shell scripts. They prevent so called globbing and word splitting, read ShellCheck Wiki article SC2086 for more information about this topic.


Always pipe your scripts to ShellCheck

added 702 characters in body
Source Link
Vlastimil Burián
  • 31.1k
  • 66
  • 209
  • 358

Syntax highlighting is one thing. The double quotes another.

Syntax highlighting is one problem

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

Missing double quotes are a bigger problem

Finally, whatWhat should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use googleGoogle.


PS: Always pipe your scripts to

Always pipe your scripts to ShellCheck


PPS:

Double quote to prevent globbing and word splitting

For shell script writers, ShellCheck ;nano editor is hardly usable, because it won't recognize variables from inside string (quotes), which is very bad for every shell script writer. Double quotes are completely essential in shell scripts. They prevent so called globbing and word splitting, read ShellCheck Wiki article SC2086 for more information about this topic.

Syntax highlighting is one thing. The double quotes another.

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

Finally, what should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use google.


PS: Always pipe your scripts to ShellCheck ;)

Syntax highlighting is one problem

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

Missing double quotes are a bigger problem

What should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use Google.


PS:

Always pipe your scripts to ShellCheck


PPS:

Double quote to prevent globbing and word splitting

For shell script writers, nano editor is hardly usable, because it won't recognize variables from inside string (quotes), which is very bad for every shell script writer. Double quotes are completely essential in shell scripts. They prevent so called globbing and word splitting, read ShellCheck Wiki article SC2086 for more information about this topic.

added 193 characters in body
Source Link
Vlastimil Burián
  • 31.1k
  • 66
  • 209
  • 358

Syntax highlighting is one thing. The double quotes another.

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

Finally, what should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use google.


PS: Always pipe your scripts to ShellCheck ;)

Syntax highlighting is one thing. The double quotes another.

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

Finally, what should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use google.

Syntax highlighting is one thing. The double quotes another.

Each editor has its own dis-/advantages in this manner.

See my question on SoftwareRecs and its respective answers, most importantly this for both CLI and GUI and this for GUI.

Notably, Visual Studio Code, has IMHO the best Syntax highlighting from GUI editors.

From CLI editors, refer to the answer of gVim, which does the same syntax highlighting job for CLI.

Note that as I was a heavy nano user, I can tell you nano can't distinguish the variables inside quotes.

Finally, what should trouble you most is that you did not use - I suppose you're not used to it - bad habit - the double quotes. Please refer to StackOverflow for more information or simply use google.


PS: Always pipe your scripts to ShellCheck ;)

Source Link
Vlastimil Burián
  • 31.1k
  • 66
  • 209
  • 358
Loading