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