The author's script (unknowingly) was relying on word splitting to convert string to cut-compatible format.
Shellcheck suggested: "Double quote to prevent globbing and word splitting."
Author implemented the suggestion, which (as advertised) prevented word splitting.
The script stopped working.
---
Related: every once in a while I talk to people who don't know how Unix argv vector works, and how come "system" takes space separated string which needs quoting, while "subprocess.run"/"execv" takes a list of strings which do not need quoting.
Anyone knows a good blog post with concise explanation of this concept that I can send them to? Because all I am finding is either manpage-level document which assumes reader already knows the concept, or huge books which mention many unrelated things as well.
Shellcheck suggested: "Double quote to prevent globbing and word splitting."
Author implemented the suggestion, which (as advertised) prevented word splitting.
The script stopped working.
---
Related: every once in a while I talk to people who don't know how Unix argv vector works, and how come "system" takes space separated string which needs quoting, while "subprocess.run"/"execv" takes a list of strings which do not need quoting.
Anyone knows a good blog post with concise explanation of this concept that I can send them to? Because all I am finding is either manpage-level document which assumes reader already knows the concept, or huge books which mention many unrelated things as well.