• grrgyle@slrpnk.net
    link
    fedilink
    arrow-up
    3
    ·
    8 hours ago

    Oh that’s very interesting. I usually do sort --unique or sort [...] | uniq if I need specific sorting logic (like by size on disk, etc).

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      7 hours ago

      Looking at the above awk snippet, it’ll retain order, though. So, sort will normally change the order. The awk snippet won’t, just skip occurrences of a given line after the first. Depending upon the use case, that order retention could be pretty desireable.