This section includes suggestions to help you find and fix problems you may be having with your scripts. Each line that is read is put to the screen.īoth scripts close the file before they exit. When reading from the file, lines 4 and 5 loop through the file line by line until it reaches the end of the file. Later in the script when you see these filehandles, its input or output passing to the open file. Line 3 in both scripts opens the file either for reading (r) or writing (w) and assigns it to a filehandle (somefile or otherfile). These two short scripts write a file called tcl_test and then read it back. Example: Create 10 users from usr0001 to usr0010: ![]() The output is only shown for the first two users due to space considerations. The next script uses a loop to create a preset number of users on the FortiGate device, in this case 10 users. lines 21-25 output the information stored in the status arrayĮven though the last script used a loop, that script’s main purpose was storing information in the array. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |