I am writing a simple script that does a /tool fetch to fetch some URL and storing it in a file, resulting in a small file of textlines.
Fortunately the file is always (much) smaller than 4K, so I can then get it into a variable using [/file get "$name" contents].
This works OK, but I get the entire file contents in the variable.
Now I need to write some loop to process it line-by-line. Is there a clean example how to do this?
I have been looking for string manipulation functions like "split" that would split the variable into an array or list, but have
not found anything yet. Unfortunately the examples are all indexed by what they achieve, examples of programming
techniques are hard to find.