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