#!/bin/echo Source me: .
#
# Copyright (c) 2002-2004 by Frederick Bruckman
# All rights reserved.

# Concatenate contents of arguments or standard in, and emit
# line-by-line reversed to standard out, much like the Solaris
# utility of the same name. ("tac is "cat" spelled backwards!)
#
tac () {
	awk '
		{
			all_lines[++n] = $0
		}
		END {
			while (n) print all_lines[n--]
		}
	' "$@"
}
