Loading ...
Sorry, an error occurred while loading the content.

Re: Regex headache :)

Expand Messages
  • DouglasPotts@spectral-sys.com
    This is a little late as a suggestion, but I guess I thought someone else would come up with it as well. How about uniq ? It is in the GNU textutils
    Message 1 of 3 , Dec 7, 2000
    • 0 Attachment
      This is a little late as a suggestion, but I guess I thought someone
      else would come up with it as well. How about 'uniq'? It is in the
      GNU textutils package.

      - SOPHOCLES:/WINDOWS 201% uniq --help
      Usage: uniq [OPTION]... [INPUT [OUTPUT]]
      Discard all but one of successive identical lines from INPUT (or
      standard input), writing to OUTPUT (or standard output).

      -c, --count prefix lines by the number of occurrences
      -d, --repeated only print duplicate lines
      -f, --skip-fields=N avoid comparing the first N fields
      -i, --ignore-case ignore differences in case when comparing
      -s, --skip-chars=N avoid comparing the first N characters
      -u, --unique only print unique lines
      -w, --check-chars=N compare no more than N characters in lines
      -N same as -f N
      +N same as -s N
      --help display this help and exit
      --version output version information and exit

      A field is a run of whitespace, than non-whitespace characters.
      Fields are skipped before chars.

      Report bugs to textutils-bugs@...

      -Doug

      --
      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
      Douglas L. Potts Spectral Systems, Inc. Url: http://www.bigfoot.com/~pottsdl
      "Writing is easy. It's all a matter of staring at a blank piece of paper
      until your forehead bleeds" -Douglas Adams
      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*



      Gregoire
      Welraeds To: VIm Mailling list <vim@...>
      <greg@perceva cc:
      l.be> Subject: Re: Regex headache :)

      12/07/00
      08:50 AM





      On Wed, 6 Dec 2000, Jean-Raymond.Chauviere wrote:

      <snip>

      > Not the answer to your question, ( I suppose pepe's one is good)
      > but anyway you don't need awk
      > sort -u +0 -1
      > can do the job, eventually redirected to the vim buffer :-)

      Yes, I could use sort. My awk script, if expanded, has only 4/5
      lines... In the words, sort wins ! :)

      Thank you guys for your answer. My curiosity has been satisfied 'till next
      time. I'm always amazed by the fact that there is almost a vim answer to
      every question :).

      Gregoire Welraeds
      Perceval Development Team!
      devel@...
      -------------------------------------------------------------------------------

      Perceval Technologies sa/nv Tel: +32-2-6409194
      Rue Tenbosch, 9 Fax: +32-2-6403154

      B-1000 Brussels general information:
      info@...
      BELGIUM technical information:
      helpdesk@...
      URL: http://www.perceval.be/
      -------------------------------------------------------------------------------
    Your message has been successfully submitted and would be delivered to recipients shortly.