How to use the output of print in scripts?
Posted: Fri Oct 01, 2021 10:57 pm
I'm making my routers send me an e-mail and I'd like to include things like the output of or :
However, trying to concatenate that to a string always results in an empty string. I suppose only outputs to the terminal or a file. I've also tried saving the output to a file but don't know how to read it again. With ? Surely there gotta be a better way, but how?
Consulting https://wiki.mikrotik.com/wiki/Manual:S ... and_Tricks wasn't fruitful either.
Code: Select all
/system routerboard print
Code: Select all
/ip address print
Code: Select all
/ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 D 192.168.1.72/24 192.168.1.0 bridgeLocal
Code: Select all
print
Code: Select all
print
Code: Select all
fetch
Consulting https://wiki.mikrotik.com/wiki/Manual:S ... and_Tricks wasn't fruitful either.