Community discussions

MikroTik App
 
crs
just joined
Topic Author
Posts: 18
Joined: Wed Mar 10, 2010 10:19 am

intercept output of command to variable

Mon Feb 13, 2012 2:31 pm

Hi.

I have script that monitors my network connection. It works by sending pings to specific address and counts number of succesfull packets. In case of trouble I would like to have traceroute to this address to determine point of failure. Unfortunatelly I can't get output of traceroute command to variable to write it to log. Is there any way to force traceroute to put output to variable instead of terminal? Something like that (but this intercepts return code(?) instead of output):

:global output [/tool traceroute google.com]
 
PaRaN0iD
newbie
Posts: 28
Joined: Sun Jan 08, 2012 7:46 pm

Re: intercept output of command to variable

Tue Feb 14, 2012 10:37 pm

Dump Log to file then get variable from file!
 
crs
just joined
Topic Author
Posts: 18
Joined: Wed Mar 10, 2010 10:19 am

Re: intercept output of command to variable

Wed Feb 15, 2012 10:11 am

Hmm... Is it possible to have output of traceroute in log ?