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----- > 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 -l > b) Without opening the file and looping over the records (Of course, wc -l does just what (b) does...) If all the lines are the same length and you know that length: $no_lines = (stat($file))[7] / $record_length; Otherwise, you're stuck. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]