Find the answer to your Linux question:
Results 1 to 2 of 2
hey, I am working on processing large number of files in a directory ..These files are of this format .. <code> abc-number abc-def-number abc-ghi-number </code> I would like to sort ...
  1. #1
    Just Joined! AceAll's Avatar
    Join Date
    May 2005
    Posts
    67

    Arrow grep issue

    hey,

    I am working on processing large number of files in a directory ..These files are of this format ..

    <code>
    abc-number
    abc-def-number
    abc-ghi-number
    </code>

    I would like to sort these files according to the number that is
    displayed in the end. If I use <i>wildcard</i> after first word, then it searches
    for all the other variants as well.

    Like search for abc, i get results of abc-def and abc-ghi as well.

    Using delimiter ($) by the end of the string will prevent me from sorting the
    number that occurs by the end of it.

    Let me know if there is any workaround to search for the exact <i>word-number</i> to
    start processing.

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    1) The forum markup codes use square brackets, [ ], not < >.

    2) Your post confuses me: the title is grep issue, yet you seem to be talking about sorting.

    3) To get the best solutions and/or workarounds, I suggest that you post a representative sample of the data, and your expected output to avoid ambiguity.

    Best wishes ... cheers, drl (50)
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...