Command Line File Utility?

Discussion in 'Computer Support' started by Slyfoot, Jul 1, 2004.

  1. Slyfoot

    Slyfoot Guest

    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

    --
    Sam Campbell III
    Professional Dilettante
    http://www.livejournal.com/~slyfoot/
     
    Slyfoot, Jul 1, 2004
    #1
    1. Advertising

  2. Slyfoot

    Slyfoot Guest

    On Thu, 01 Jul 2004 17:56:52 GMT, (Slyfoot) wrote:

    [snip]

    Hmmm, I found that using an option on a GREP utility can display all
    the lines without the string in question, and then it can be
    redirected to another file. That's good enough for me!

    ~Sly

    --
    Sam Campbell III
    Professional Dilettante
    http://www.livejournal.com/~slyfoot/
     
    Slyfoot, Jul 1, 2004
    #2
    1. Advertising

  3. 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
     
    Gary G. Taylor, Jul 2, 2004
    #3
  4. Slyfoot

    Slyfoot Guest

    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/
     
    Slyfoot, Jul 2, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom
    Replies:
    2
    Views:
    1,043
  2. Nervous Nick

    Re: Command line utility to compare images

    Nervous Nick, Apr 29, 2008, in forum: Digital Photography
    Replies:
    0
    Views:
    977
    Nervous Nick
    Apr 29, 2008
  3. chuckcar
    Replies:
    11
    Views:
    9,663
    §ñühw¤£f
    Apr 21, 2009
  4. Evan Platt
    Replies:
    1
    Views:
    932
    John Holmes
    Apr 18, 2009
  5. Colby_

    Using WinRAR command line utility

    Colby_, Mar 10, 2010, in forum: Computer Support
    Replies:
    0
    Views:
    3,674
    Colby_
    Mar 10, 2010
Loading...

Share This Page