SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
counting line number in a file

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
counting line number in a file
Author Message
Marco



Joined: 11 Jun 2001
Posts: 7

Post counting line number in a file Reply with quote

how i can count the number of lines in a text file using a jal script ?
regards.

Mon Jun 11, 2001 9:19 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: counting line number in a file Reply with quote

Two quick script methods are:
1. Read file line by line using "LineMode" for reading and count lines:
"FileOpen" then "LoopWhile" with end-of-file check, "FileRead", Incelement counter variable, "FileClose" at the end.

2. Use FileCompare (available in v3.0.0 and later) to compare it against an empty file. The returned value will tell you how many "new" lines were found.
This method is much fatster and requires less coding, but it is not that obvious as the first method.

: how i can count the number of lines in a text file using a jal script ?
: regards.

Mon Jun 11, 2001 10:30 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.