this post was submitted on 17 Jan 2025
2 points (75.0% liked)
Bash
892 readers
1 users here now
Talk about the Bash Shell and Bash scripting
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks, that was it! I've updated the post to include a final subshell example where we get the 127 return code we might have expected instead of the 255 from the second paragraph.
There's something different about cmd substitution subshells to regular ones that produces this behaviour (the 255), it's a quirk of BASH.