Re: Getting line count of a text file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



personally i try to use as little shell commands as possible,
especially stacked on top of each other in exec().

i'd just use explode, str_split, substr/strpos, etc. after i got it back.

On 9/12/07, Wolf <lonewolf@xxxxxxxxx> wrote:
> Novel approach...  But mine's less typing.  :)
>
> never thought of using awk for it though.  Good one! :)
>
> ---- bruce <bedouglas@xxxxxxxxxxxxx> wrote:
> > hey...
> >
> > if you're going to do the system approach, go ahead and use awk/cut...
> >
> > wc -l foo.txt | awk -F' ' '{print $1}'
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux