[Gambas-user] Some file/use or progress bar questions.

Ron_1st ronstk at ...239...
Mon Feb 2 22:38:02 CET 2009


On Monday 02 February 2009, richard terry wrote:
> 1) I have a file with some 30,000 lines, but I want to know how many lines are 
> in the file before I do anything to it - is this possible. I couldn't see how 
> just looking at the syntax for files.
> 
> 
> 2) Given that I could figure out how many lines, I wondered if someone could 
> give me some tips on how to use the progress bar and how one moves it along 
> in any situation in response to how long something takes - I mean - does one 
> just "guess" the time it will take and move the pointer accordingly?
> 
> Regards
> 
> richard
> 


something like  shell(wc -l "filename")  

Info in man pages for cli programm with name 'wc'

wc

-c, --bytes
 print the byte counts 

-m, --chars
 print the character counts 

-l, --lines
 print the newline counts 

--files0-from=F
 read input from the files specified by NUL-terminated names in file F 

-L, --max-line-length
 print the length of the longest line 

-w, --words
 print the word counts


Best regards,

Ron_1st

-- 
 A: Delete the text you reply on.
 Q: What to do to get my post on top?
---
 A: Because it messes up the order in which people normally read text. 
 Q: Why is top-posting such a bad thing? 
---
 A: Top-posting. 
 Q: What is the most annoying thing in e-mail? 
 




More information about the User mailing list