NATSORT(1)

πŸ“¦
version 8.4.0 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

✨ NATSORT(1) ✨

okay bestie, you're looking at the natsort manual page β€” that's the User Commands corner of the man pages, and yes, it's giving "natural sorting for shell" πŸ’… let's get into it.


🌸 NAME 🌸

natsort β€” natural sorting for shell 🐚✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so the usage is literally right here:

usage: natsort [-h] [--version] [-p] [-f LOW HIGH] [-F LOW HIGH] [-e
       EXCLUDE]

              [-r] [-t {int,float,real,f,i,r}] [--nosign] [-s] [--noexp] [-l]
              [entries ...]

It performs a natural sort on the entries you hand it on the command-line. 🫢

Arguments are read from sys.argv.


πŸŽ€ positional arguments πŸŽ€

  • entries β€” the entries you want sorted, bestie. If you don't put anything on the command line, they get taken from stdin. no cap. πŸ’–

πŸ’… options πŸ’…

  • -h, --help β€” show this help message and then exit. classic. ✨
  • --version β€” show the program's version number and exit. πŸ‘‘
  • -p, --paths β€” interpret the input as file paths. ngl, this isn't strictly necessary to sort all file paths, but when you've got OS-generated paths like "Folder/" and "Folder (1)/", you need this option so the paths come out in the order you actually expect β€” that's "Folder/" before "Folder (1)/". the way that matters 😭
  • -f, --filter LOW HIGH β€” used for keeping only the entries that have a number falling in the given range. filtering era πŸ“
  • -F, --reverse-filter LOW HIGH β€” used for excluding the entries that have a number falling in the given range. opposite vibe, same energy πŸ’€
  • -e, --exclude EXCLUDE β€” used to exclude an entry that contains a specific number. bye bestie πŸ‘‹
  • -r, --reverse β€” returns in reversed order. main character flip πŸ”„
  • -t, --number-type, --number_type {int,float,real,f,i,r} β€” choose the type of number to search for. "float" will search for floating-point numbers. "int" will only search for integers. "real" is a shortcut for "float" with --sign. "i" is a synonym for "int", "f" is a synonym for "float", and "r" is a synonym for "real". The default is int. 🧚
  • --nosign β€” do not consider "+" or "-" as part of a number, i.e. do not take sign into consideration. This is the default. πŸ™ˆ
  • -s, --sign β€” consider "+" or "-" as part of a number, i.e. take sign into consideration. The default is unsigned. 🌈
  • --noexp β€” do not consider an exponential as part of a number, i.e. 1e4 would be considered as 1, "e", and 4, not as 10000. This only effects the --number-type=float. ⚠️
  • -l, --locale β€” causes natsort to use locale-aware sorting. You will get the best results if you install PyICU. 🌍

πŸ’œ SEE ALSO πŸ’œ

The full documentation for natsort is maintained as a Texinfo manual. If the info and natsort programs are properly installed at your site, the command

info natsort

should give you access to the complete manual. go read it, iykyk πŸ“–βœ¨


sign-off bestie πŸ’– this page is from natsort 8.4.0, dated January 2026, and it lives under NATSORT(1) in the User Commands section. slay, that's the whole page, periodt. πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from