]> git.ipfire.org Git - thirdparty/man-pages.git/blob - scripts/sortman
scripts/sortman: Support pages with suffixes (not subsections)
[thirdparty/man-pages.git] / scripts / sortman
1 #!/bin/sh
2
3 # Copyright 2023, Alejandro Colomar <alx@kernel.org>
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 export LC_COLLATE=en_US.UTF-8;
7
8 sed -E '/\/intro./ s/.*\.([1-8])/\10\t&/' \
9 | sed -E '/\/intro./!s/.*\.([1-8])\>/\11\t&/' \
10 | sed -E '/\/intro./!s/.*\.([1-8][[:alnum:]]+)/\1\t&/' \
11 | sort \
12 | cut -f2;