logo

utils-extra

Collection of extra tools for Unixes

wordsort (367B)


  1. #!/bin/sh
  2. # utils-extra: Collection of extra tools for Unixes
  3. # SPDX-FileCopyrightText: 2017-2023 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  4. # SPDX-License-Identifier: MPL-2.0
  5. # Uses -z on sort(1), present in GNU, FreeBSD, OpenBSD, BusyBox ; absent in NetBSD
  6. # Any options are passed to sort(1)
  7. tr -d '\n' | tr ' ' '\000' | sort -z "$@" | tr '\000' ' '