Lines in a text file

Subject: Lines in a text file
From: Peter Gold <peter -at- knowhowpro -dot- com>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Wed, 26 May 2004 07:46:13 -0500


Dan:

There's been a suggestion to use a unix utility, or an emulated unix
utility. However, a similar and simpler solution, if you're in Windows is to
use the DOS "find" command-line utility.

Open a DOS Prompt window. Here's an example of what to do:

prompt> cd full_directory_path [change to the directory that contains the
file. Alternatively, copy the file into your home directory.]

prompt> help find <Enter> [usage syntax for the command appears]

prompt> find /I /C /V "xxx" textfile_name.txt [uses the find utility to
search for the string "xxx" Ignoring case (/I), Counting lines (/C),
inVerting the search (/V) to find lines that don't contain the string.]

-------------- textfile_name.txt ## [filename followed by number of lines]
prompt>

HTH

Regards,

Peter Gold
_________________________________________________________________________
KnowHow ProServices
FrameMaker training, coaching, consulting, template design
http://www.knowhowpro.com
Adobe Certified Expert: FrameMaker 7, FrameMaker+SGML Authoring, Acrobat,
InDesign, WebWorks Professional Certified trainer
Phone: 612.823.7113


On 5/26/04 1:00 AM, "TECHWR-L digest" <techwr-l -at- lists -dot- raycomm -dot- com> wrote:

> Subject: Lines in a text file
> From: "Goldstein, Dan" <DGoldstein -at- DeusTech -dot- com>
> Date: Tue, 25 May 2004 17:26:47 -0400
> X-Message-Number: 28
>
> Does anyone know of a way to count the lines in a text file without opening
> it? I'm familiar with Word's line-counting ability, but I don't think that
> that will help in this case.
>
> Thanks,
>
> Dan



^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SEE THE ALL NEW ROBOHELP X5 IN ACTION: RoboHelp X5 is a giant leap forward
in Help authoring technology, featuring Word 2003 support, Content
Management, Multi-Author support, PDF and XML support and much more! http://www.macromedia.com/go/techwrldemo

>From a single set of Word documents, create online Help and printed
documentation with ComponentOne Doc-To-Help 7 Professional, a new yearly
subscription service offering free updates and upgrades, support, and more.
http://www.doctohelp.com

---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.



Previous by Author: RE: tee-hee!
Next by Author: punctuation in bullet text
Previous by Thread: RE: Lines in a text file
Next by Thread: Re: Literate/Illiterate (WAS: Documenting installers?)


What this post helpful? Share it with friends and colleagues:


Sponsored Ads