diff options
author | Rob Landley <rob@landley.net> | 2012-01-22 20:33:15 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2012-01-22 20:33:15 -0600 |
commit | 5b67c38f86318bfa8ff8e631aa9c5e0ea1a70c64 (patch) | |
tree | 0e81b3df4326f46f3144e46b0198d6bf4a1a1995 /wrappers/tac | |
parent | 4c2484f46f969414b2aaf08300d80a81f18edcb1 (diff) | |
download | toybox-5b67c38f86318bfa8ff8e631aa9c5e0ea1a70c64.tar.gz |
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.
Diffstat (limited to 'wrappers/tac')
-rwxr-xr-x | wrappers/tac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wrappers/tac b/wrappers/tac new file mode 100755 index 00000000..6253b70f --- /dev/null +++ b/wrappers/tac @@ -0,0 +1,7 @@ +#!/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 |