in reply to Re: How To Count Lines In File?
in thread How To Count Lines In File?

Hi ,

The code you have here, does it work only in Unix , I got the contents of the file in WINDOWS instead of showing the number of lines.Please explain if this is for Unix alone or why in windows it acts this way

Replies are listed 'Best First'.
Re: Re: Re: How To Count Lines In File?
by ryddler (Monk) on Jan 27, 2003 at 03:45 UTC
    The command shell in windows can't handle the single quotes (') shown in that oneliner. Change them to double quotes (") and it should work for you.
    perl -lpe "}{*_=*.}{" file


    ryddler