summaryrefslogtreecommitdiff
path: root/tac.sh
blob: d0f15049b7bad07fcb158dc517c1f34a0cf593e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
cat "$@" | awk "$(tail -n +3 $0)"	# TODO: reverse order of arguments
exit $?

{
	lines[NR] = $0;
}

END {
	for (i = NR; i > 0; i--) {
		print lines[i]
	}
}