Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • can you give the input file contents. Commented Nov 2, 2016 at 2:25
  • @Kamaraj edited. Commented Nov 2, 2016 at 2:28
  • What flavor of awk? Does it have an asorti function? Commented Nov 2, 2016 at 2:39
  • 1
    Since the sort command can't terminate until it receives an end-of-file, and you never close it, this seems a bit silly. Why not just add a shell wrapper script to pipe the output of the Awk script through sort? Commented Nov 2, 2016 at 4:14
  • 1
    @KMoy, this is relevant. I'm having trouble understanding why you would want the sorted list after both ------ lines and not before. Did I get that correctly that that's what you want? Commented Nov 2, 2016 at 4:59