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

Scripting • Re: Is 8MB in a variable from a txt file is possible?

$
0
0
From ROS version 7.13 there is /file/read command (currently undocumented) which you can use to read file chunked with arguments chunk-size and offset. First, fetch command will need to download whole file on to FS and not be used to return response data as value to variable.
This can be useful for parsing text by some delimiter, to read file chunked and hold characters buffer variable until delimiter is reached (assuming that text between delimiters will not reach variable size limit). In your case it can be done since new line is delimiter and lines are not long, but this read feature it still not enough for parsing large meta data files like json (depends on structure, some can be parsed like large arrays of smaller items).

Statistics: Posted by optio — Fri Mar 01, 2024 12:52 pm



Viewing all articles
Browse latest Browse all 15394

Trending Articles