> even some shell scripts mysteriously not working properly
I'm wondering how this could happen.
I'm guessing the script is using uname to detect the platform, and gets confused by Linux on ARM.
I used to see a lot of shell scripts which detected Linux vs Solaris vs AIX vs HP-UX and did different things on each, especially due to differences in what commands and options are available. Given those commercial Unices are now shadows of their former selves, you don't see that so much any more.
But I still see it in scripts that have to run on both macOS and Linux. I've even written a few of those scripts recently.
This shouldn't be an issue, though, if you just do `uname -s` – you should get e.g. `Linux` on both ARM and x86. Maybe some people, for whatever reason, are checking `uname -p` or `uname -m` instead or as well, or even trying to parse the output of `uname -a` – not a very good practice
Ehh, once you get to a certain point you wind up poking things under /sys and /proc that are a little different per-architecture, or building snippets of C code that make syscalls which behave differently per-architecture. Not to mention that ARM distros are usually a little different, either lagging behind or a little ahead of what exists for x86 - although it's better than it used to be, especially with ARM64.
I'm wondering how this could happen.
I'm guessing the script is using uname to detect the platform, and gets confused by Linux on ARM.
I used to see a lot of shell scripts which detected Linux vs Solaris vs AIX vs HP-UX and did different things on each, especially due to differences in what commands and options are available. Given those commercial Unices are now shadows of their former selves, you don't see that so much any more.
But I still see it in scripts that have to run on both macOS and Linux. I've even written a few of those scripts recently.
This shouldn't be an issue, though, if you just do `uname -s` – you should get e.g. `Linux` on both ARM and x86. Maybe some people, for whatever reason, are checking `uname -p` or `uname -m` instead or as well, or even trying to parse the output of `uname -a` – not a very good practice