Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 15133

Beginner Basics • Line break in script

$
0
0
Hi,

I created a script like this, unfortunately the result always has a line break.

The content of LATEST.7 is 7.12.1 WITHOUT a line book
Code:
/system script add name="MikrotikUpdateVersionCheck" source={     :global arch [/system resource get architecture-name]     :global server "http://192.168.111.1/mikrotik_npks"     :global latest version     :global currentVersion [/system package update get installed-version]     /tool fetch url=($server . "/LATEST.7") mode=http dst-path="latestVersion.txt"     :set latestVersion [/file get latestVersion.txt contents]     :if ($latestVersion != $currentVersion) do={         /system script run MikrotikUpdateDownload     }     :put "Architecture: $arch"     :put "Server: $server"     :put "Latest version: $latestVersion"     :put "Current version: $currentVersion"}
The Result is:

http://192.168.111.1/mikrotik_npks/routeros-7.12.1
-mipsbe.npk

Statistics: Posted by dima1002 — Mon Dec 25, 2023 11:35 am



Viewing all articles
Browse latest Browse all 15133

Trending Articles