On Tuesday, June 18, 2002, at 08:46 , Shishir K. Singh wrote:
> Is there a way to get the number of lines in a file. Conditions:
>
> a) Without using backticks on wc -l
> b) Without opening the file and looping over the records
not really unless your OS provides some sort of 'meta-data'
file t
from the cookbook:
$count += tr/\n/\n/ while sysread(FILE, $_, 2 ** 16);
> -Original Message-
> From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:47 AM
> To: [EMAIL PROTECTED]
> Subject: No of lines in a file
>
>
> Hi,
>
> Is there a way to get the nu
Uh oh!! Thanks !! Guess I will have to do it the old fashioned way!!
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:51 AM
To: Shishir K. Singh; [EMAIL PROTECTED]
Subject: RE: No of lines in a file
> -Original Message-
>
> -Original Message-
> From: Shishir K. Singh [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:47 AM
> To: [EMAIL PROTECTED]
> Subject: No of lines in a file
>
>
> Hi,
>
> Is there a way to get the number of lines in a file. Conditions:
>
> a) Without using backticks on wc