Underscores or dashes in the middle of words should be significant:
man5/procfs.5
man5/proc.5
man5/proc_a.5
man5/proc_z.5
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| sed -E '/\/intro./! s/.*\.([[:digit:]])\>/\11\t&/' \
| sed -E '/\/intro./! s/.*\.([[:digit:]])([[:alnum:]]+)/\12.\2\t&/' \
| sed -E ' s/\t(.*)/&\n\1/' \
-| sed -E '/\t/ s/([^[:digit:]])[_-]([^[:digit:]])/\1\2/g' \
+| sed -E '/\t/ s/\/[_-]*/\//g' \
| sed -E '/\t/ s/[_-]/_/g' \
| sed -E '/\t/ {N;s/\n/\t/;}' \
| sort -fV \