Community discussions

MikroTik App
 
rosa
newbie
Topic Author
Posts: 41
Joined: Mon Jan 15, 2024 6:10 am

How to read text content exceeding 10000 lines?

Mon Jan 15, 2024 6:19 am

I am preparing a test script to read a line of content from a text file and modify the user and pass parameters of pppoe-out1 for dialing testing! If successful, it will be written to a result file. Can this operation be implemented using a script? I am a beginner in ROS scripting. Do you have any experts who can provide an example? The content of the text file is a 10000 line number. The first line consists of 7 numbers. Read only one line at a time, read the second line after completing the test.
 
rosa
newbie
Topic Author
Posts: 41
Joined: Mon Jan 15, 2024 6:10 am

Re: How to read text content exceeding 10000 lines?

Mon Jan 15, 2024 9:57 am

For example, the text file containing numbers is N001.txt, and the size of this file is 87.8 KB (89998 bytes)
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12658
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: How to read text content exceeding 10000 lines?

Tue Jan 16, 2024 10:34 am

Have you read at least the existing part of the manuals regarding scripting
and the topics already present on the forum that talk about file management?
 
rosa
newbie
Topic Author
Posts: 41
Joined: Mon Jan 15, 2024 6:10 am

Re: How to read text content exceeding 10000 lines?

Tue Jan 16, 2024 3:57 pm

Have you read at least the existing part of the manuals regarding scripting
and the topics already present on the forum that talk about file management?
After reading about the relevant connection you wrote, the maximum size is 64KB, so this plan has been abandoned. Using another method, thank you~!