_Added in 1.9.0_ *$lines(filename)* Returns the total number of lines in the specified text file. *Parameters* table(ktable). |*Parameter*|*Description*| | filename | Filename to read from. | *Example*
;Open a file for writing
/fopen file file.txt

;Write a line to the file
/fwrite file Hello World

;Close the file
/fclose file

;Print the number of lines in file.txt
//echo -ag $lines(file.txt)