xref: /freebsd/usr.bin/fortune/tools/do_sort (revision b9f654b163bce26de79705e77b872427c9f2afa1)
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