opasorthosts(8)

πŸ’– opasorthosts β€” the glow-up your host list deserves πŸ’–

okay so bestie, let me put you onto opasorthosts from the IFSFFCLIRG manual (section 8, we love a sysadmin era πŸ‘‘).

This little icon sorts its standard input into a typical host name order and drops the result on standard output. Here's the tea: hosts get sorted alphabetically (case-insensitively, no cap) by whatever alpha-numeric prefix they've got, and then sorted numerically by any numeric suffix. Host names may end in a numeric field, and that field may optionally have leading zeros. So unlike a plain alphabetic sort (which is lowkey a mess πŸ’€), 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. It's giving "i said what i said" πŸ™ˆ.

Use it to build mpi_hosts input files for applications or cable tests that place hosts in order by name. Main character energy fr fr. ✨


✨ Syntax ✨

opasorthosts < hostlist>  output_file

πŸŽ€ Options πŸŽ€

  • --help β€” produces the full help text. literally the full thing, no crumbs.
  • hostlist β€” specifies the list of host names. yes queen, this is the input.
  • output_file β€” specifies the sorted list output. the glow-up destination πŸ¦‹

🌸 Examples 🌸

opasorthosts < host.xml > Sorted_host

πŸ’œ Standard Input

opasorthosts

osd04

osd1

compute20

compute3

mgmt1

mgmt2

login

πŸ’œ Standard Output

compute3

compute20

login

mgmt1

mgmt2

osd1

osd04

see how compute3 slides in before compute20? and osd1 before osd04? that's the whole vibe check passing. slay. πŸ’…πŸŒˆ

Copyright(C) 2015-2019 Intel Corporation β€” and that's the whole page, bestie, opasorthosts(8), served fresh. periodt. 🫢⭐