What in the world am I doing wrong here. Here’s an example of what I’m dealing with. (this is just an example, I know I can do [/system identity get name])
global variable systemIdent that is equal to “Jim’s Mikrotik”
From terminal:
:put [$systemIdent]
prints “Jim’s Mikrotik” --(without quotes)
In a script:
:put [$systemIdent]
prints syntax error ( line 1 column 8 )
Eventually I’m trying to write a file with some variables in it, but no matter WHAT I do, it’s like any global variable isn’t recognized inside a script. I’ve tried different syntax combinations for hours trying to figure this out. There is only 1 user account in the router, and the global variables are definitely set to the same user as the script. If I print the script out in terminal, the “s” in “systemIdent” is highlighted as an unrecognized word/command. I’ve tried $, brackets, $ in brackets, brackets with $ inside, brackets with $ inside of parenthesis, inside and outside of quotes, etc.
Obviously I’m missing something. What is it?