ethsorthosts(8)

πŸ“¦ version 12.1.0.1, in centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

✨ NAME ✨

ethsorthosts β€” it's giving host-name-sorting icon, bestie πŸ’…

Okay so real talk: this bad boy reads from stdin, sorts it in the typical host name order, and drops the result on stdout. No cap.

Hosts get sorted alphabetically (and case-insensitively, thank you very much) by any alpha-numeric prefix, and then sorted numerically by any numeric suffix. Host names may end in a numeric field, which may optionally have leading zeros. Unlike a pure alphabetic sort (booo πŸ…), this command gives you the intuitive sequencing of host names, like:

host1, host2, host10
Heads up bestie 🫢 this command does not remove duplicates. Any duplicates are listed in adjacent lines. So if you see the same host twice, that's not a glitch, that's just what it does, fr fr.

Use this command to build mpi_hosts input files for applications that place hosts in order by name. Main character behavior honestly πŸ‘‘


πŸ¦‹ SYNTAX πŸ¦‹

ethsorthosts < hostlist>  output_file

πŸŽ€ OPTIONS πŸŽ€

  • --help β€” produces full help text. The little "hi, here's everything" moment ✨
  • hostlist β€” specifies the list of host names. This is your lineup, your squad, your roster 🌸
  • output_file β€” specifies the sorted list output. Where the glow-up lands πŸ’–

πŸ”₯ EXAMPLES πŸ”₯

Like, here's the whole vibe in one line:

ethsorthosts < host.xml > Sorted_host

πŸ’œ Standard Input

ethsorthosts

osd04

osd1

compute20

compute3

mgmt1

mgmt2

login

πŸ’œ Standard Output

compute3

compute20

login

mgmt1

mgmt2

osd1

osd04

See that?? osd1 before osd04, compute3 before compute20 β€” the way it just understands numeric suffixes is so iconic. A plain alphabetic sort could never 😭✨


And that's the whole page, bestie! This one comes to you from the EFSFFCLIRG man page, written by Intel Corporation, copyright Copyright(C) 2020-2024, with the page dated 2020-2024. Slay, go sort some hosts, ily πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from