Best way to count how many lines in a variable?

I've been using this for now but I'm sure there must be a better way

The Set Variable Text to Local Line is just a frivolous action to allow the action to work as you must reference the line somewhere in the action for it to work

1 Like

You can try Filter Action. I remember there is a line number option.


Can you send the lines of text to a shell script?

If so, wc -l will return the number of lines.

1 Like