Wasted. :)

Or, consider it a skill building exercise.

* *

*ASB* *http://XeeMe.com/AndrewBaker* *Harnessing the Advantages of
Technology for the SMB market…

*



On Wed, Oct 26, 2011 at 4:25 AM, James Rankin <kz2...@googlemail.com> wrote:

> Does it? For years I've worked on the premise that the /c switch displays
> only the count of lines containing the string, and doesn't work
> intelligently with /v. If it does work the other way, I've wasted years with
> useless routines :-)
>
>
>
> On 26 October 2011 09:21, Mark Thatcher <thatche...@gmail.com> wrote:
>
>>  Or just use:
>>
>>    type textfile.txt | find /c /v "OK"
>>
>> which does give the correct count of lines without "OK"
>>
>>
>> On Wed, Oct 26, 2011 at 4:09 PM, James Rankin <kz2...@googlemail.com>
>> wrote:
>> > DIdn't read your post properly
>> >
>> > try
>> >
>> > type textfile.txt | find /c /v "~"
>> >
>> > (assuming ~ isn't used in any lines in the file)
>> >
>> > and then subtract from that the number you got from my first command I
>> sent.
>> > Not elegant but should tell you what you want
>> >
>> > On 26 October 2011 08:48, Oliver Marshall <
>> oliver.marsh...@g2support.com>
>> > wrote:
>> >>
>> >> Hi chaps
>> >>
>> >>
>> >>
>> >> Any good DOS people here? Can someone help me with a batch file command
>> >> line ?
>> >>
>> >>
>> >>
>> >> I want to return the number of lines within a text file that don’t
>> contain
>> >> OK.
>> >>
>> >>
>> >>
>> >> That is I’ll have a text file like this;
>> >>
>> >>
>> >>
>> >> Value 1 : OK
>> >>
>> >> Value 2 : FAIL
>> >>
>> >> Value 3 : OK
>> >>
>> >> Value 4 : WARNING
>> >>
>> >>
>> >>
>> >> I want to return the number of lines that don’t have OK on them.
>> >>
>> >>
>> >>
>> >> Any ideas?
>> >>
>> >>
>> >>
>> >> Olly
>> >>
>>
>

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to