xref: /freebsd/usr.bin/fortune/tools/do_sort (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1#! /bin/sh
2# an aggressive little script for sorting the fortune files
3# depends on octal 02 and 03 not being anywhere in the files.
4
5sp="/usr/bin/sort -dfu -T /var/tmp"
6
7sed 's/^%$//' | tr '\12' '\3' | tr '\2' '\12' |
8	sed -e 's/^//' -e '/^$/d' -e 's/$/%/' |
9	$sp | tr '\3' '\12'
10