maximum variable size

Hi,

I’m new to scripting.

I’m loading the contents of a txt file into a variable and then processing it. If i have a small txt file my script runs fine but with a larger txt file the contents are not loaded into the variable.

this is a snippet of my script that loads the file contents into a variable:

:global content [/file get [/file find name=static_routes_list.txt] contents] ;

i was wondering what the maximum size a variable can hold and does anyone have any tips for me with regards to processing a file in chunks.

Hi there

I honestly have no idea how to break the file up in chunks or what the maximum variable size is. I have similar questions, as for now my scripts are running smooth, but I’m afraid that I might run into the same problem once the files get much bigger.

The only solution I can think of is to try and use more files instead.

I read somewhere that the length of the file is not the problem, but the actual file size and someone mentioned something about 64kB. I can’t recall where I read this so I can’t say for certain. If anyone knows, please update us. G