Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    Where did you get the idea that $results(1) is the way to refer to the first word of $results? If $results were an array, it would use [] as the way to index it, and indexes start at 0. Commented Dec 24, 2024 at 16:04
  • @Barmar this is true. I guess its because I don't exclusively work with bash and am relatively new to it. Getting confused with the () and zero-indexing is due to me switching between many different languages, each with different syntax and conventions. However, these two mistakes on my part were not the main cause for my attempt here failing. Commented Dec 26, 2024 at 13:19