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*

3
  • 2
    Your myarray is not an array. It is a scalar holding the complete output of your script. Commented Dec 8, 2021 at 7:24
  • @user1934428 correct, I understand, that's why I mentioned array like variable. So what do you think? Commented Dec 8, 2021 at 7:25
  • I would first transform the output of myscript into a more convenient format. You don't need the square brackets or the comma, and most likely you don't need the double quotes either. You have not specified in your post, what the strings in the output can contain. In your example they contain neither spaces nor newlines, but will this always be the case? After this is done, I would a real array to store the data. See this tutorial on how this can be done. Commented Dec 8, 2021 at 7:29