view wrappers/tac @ 411:7da386057101

Add three commands that can be done as simple shell scripts (one sed is in, anyway), and don't need to be implemented in C.
author Rob Landley <rob@landley.net>
date Sun, 22 Jan 2012 20:33:15 -0600
parents
children
line wrap: on
line source

#!/bin/sh
# HELP usage: tac [FILE...]\n\nPrint input lines in reverse order

for i in "$@"
do
  sed -e '1!G;h;$!d' "$i"
done