Just for fun, you should try running your script through "shellcheck". I think shellcheck can detect (among lots of other things) the presence of weird characters in shell scripts.
In case you are not familiar with it (yet), check out www.shellcheck.net
Note, BTW, that there is a pre-compiled binary (tar.xz file) of the latest version of shellcheck, compiled for Raspberry Pi, on their site for download. Note that the version of shellcheck provided in the distro repos is often rather old.
The current version is: 0.10.0
(From what I can tell, both the leading and trailing 0s are constants; all that changes is the middle number)
In case you are not familiar with it (yet), check out www.shellcheck.net
Note, BTW, that there is a pre-compiled binary (tar.xz file) of the latest version of shellcheck, compiled for Raspberry Pi, on their site for download. Note that the version of shellcheck provided in the distro repos is often rather old.
The current version is: 0.10.0
(From what I can tell, both the leading and trailing 0s are constants; all that changes is the middle number)
Statistics: Posted by BigRedMailbox — Sat Jul 20, 2024 10:00 am