xref: /freebsd/tools/sched/make_ktr.sh (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1*86112ec5SRyan Stone#!/bin/sh
2*86112ec5SRyan Stone#
3*86112ec5SRyan Stone# Copyright (c) 2012 Ryan Stone
4*86112ec5SRyan Stone# All rights reserved.
5*86112ec5SRyan Stone#
6*86112ec5SRyan Stone# Redistribution and use in source and binary forms, with or without
7*86112ec5SRyan Stone# modification, are permitted provided that the following conditions
8*86112ec5SRyan Stone# are met:
9*86112ec5SRyan Stone# 1. Redistributions of source code must retain the above copyright
10*86112ec5SRyan Stone#    notice, this list of conditions and the following disclaimer.
11*86112ec5SRyan Stone# 2. Redistributions in binary form must reproduce the above copyright
12*86112ec5SRyan Stone#    notice, this list of conditions and the following disclaimer in the
13*86112ec5SRyan Stone#    documentation and/or other materials provided with the distribution.
14*86112ec5SRyan Stone#
15*86112ec5SRyan Stone# THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
16*86112ec5SRyan Stone# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*86112ec5SRyan Stone# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*86112ec5SRyan Stone# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
19*86112ec5SRyan Stone# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*86112ec5SRyan Stone# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21*86112ec5SRyan Stone# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*86112ec5SRyan Stone# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*86112ec5SRyan Stone# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*86112ec5SRyan Stone# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*86112ec5SRyan Stone# SUCH DAMAGE.
26*86112ec5SRyan Stone#
27*86112ec5SRyan Stone#
28*86112ec5SRyan Stone
29*86112ec5SRyan Stoneif [ "$#" -ne 2 ]
30*86112ec5SRyan Stonethen
31*86112ec5SRyan Stone	echo "Usage: make_ktr input output" >&2
32*86112ec5SRyan Stone	exit 1
33*86112ec5SRyan Stonefi
34*86112ec5SRyan Stone
35*86112ec5SRyan Stonesort -k 2nrb $1 | cat -n > $2
36*86112ec5SRyan Stone
37