I am not very good in scripting, but has used it some to graph data found in MT and send it out to using Syslog to Splunk for analyzes.
See my project here:
viewtopic.php?t=137338
Taken some part from the script and modified for cell info
This should send it out using syslog
:local cell ([/interface lte cell-monitor number=0 duration=5]);
:log info message="cell_info=$cell";
PS use code tag around your code to make your post more readable.
Edit after some search found this on how to write to a file:
# Create a file with specific content.
{
# Variables.
:local filename "test.txt"
:local content "This is a test."
# Create file.
/file print file=$filename where name=""
# Wait for the file to be created.
:delay 1
# Set file's content.
/file set $filename contents=$content
}
So try this:
# Create a file with specific content.
{
# Variables.
:local filename "ltecellmonitor.txt"
:local content [/interface lte cell-monitor number=0 duration=5]
# Create file.
/file print file=$filename where name=""
# Wait for the file to be created.
:delay 1
# Set file's content.
/file set $filename contents=$content
}