The scripting syntax and variable difference between v2.8 and 6.x is why the script is failing. The first black mark is a warning. There should be an equals sign = instead of a blank space; using a space is deprecated I assume.
The red marks are errors. Copy paste this line into the terminal:
/interface monitor-traffic ether1 once do={
:put (
Then press TAB a couple times to show the list of available variables:
This shows us that the variable names have changed, and sent-bits-per-second is now tx-bits-per-second. Start typing this new name and then hit TAB again to auto-complete it. Close the parentheses, press enter, close the curly bracket, and press enter. Then you see the ouput, something like this:
You can also use $ but the variables need to be quoted:
/interface monitor-traffic ether1 once do={
:put ($"tx-bits-per-second")
}
So, a snippet of code that works would be something like this which loops through all interfaces and finds tx and rx kbps: