On Thu, 01 Jul 2004 23:48:55 GMT, "Gary G. Taylor"
<> wrote:
>Slyfoot wrote:
>
>> Hey folks...
>>
>> I need a command line utility that will remove all the lines in a .TXT
>> file containing a "string". For example, if I want to go through a
>> file and remove every line containing the word "nantucket", I'd like
>> to be able to type something like STRIPTXT *.TXT "nantucket" or
>> something similar. Anybody have an idea where I can find a utility
>> like that?
>>
>> Thanks!
>>
>> ~Sly
>>
>Linux, si -- any of a number of possible tools and any of a number of
>possible ways of doing it. Windows? No. Sawree.
>--
>Gary G. Taylor * Rialto, CA
>gary at donavan dot org / http:// geetee dot donavan dot org
>"The two most abundant things in the universe
>are hydrogen and stupidity." --Harlan Ellison
Actually I've discovered several ways of doing it now. One is using a
utility like GREP or XGREP and using redirection to files (with > or
>>). But I found a couple of fantastic little freeware commandline
utilities called YANK and LINEX that will do exactly what I want. I
just pass the string and filename(s) to YANK (with an option to ignore
case sensitivity) and it operates on the file and strips every line
that includes the "string". I've used Linux and I know how powerful
it is, but you'd be surprised at how many things you can do on the
DOS/Windows commandline!
~Sly
--
Sam Campbell III
Professional Dilettante
http://www.livejournal.com/~slyfoot/