summaryrefslogtreecommitdiff
path: root/applets_sh/tac
diff options
context:
space:
mode:
authorPere Orga2012-02-09 18:23:33 +0100
committerDenys Vlasenko2012-02-09 18:23:33 +0100
commitd0222503ff9ff264efa74f6de651b308d20a05b8 (patch)
tree7eb01024fd36dfebc5f303a3cc408766925b1604 /applets_sh/tac
parent594db1e62a060a0a5646f6840112189fd0ce3b81 (diff)
downloadbusybox-d0222503ff9ff264efa74f6de651b308d20a05b8.zip
busybox-d0222503ff9ff264efa74f6de651b308d20a05b8.tar.gz
applets_sh/*: Add a few more examples of "shell applets"
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'applets_sh/tac')
-rwxr-xr-xapplets_sh/tac7
1 files changed, 7 insertions, 0 deletions
diff --git a/applets_sh/tac b/applets_sh/tac
new file mode 100755
index 0000000..c5a8e39
--- /dev/null
+++ b/applets_sh/tac
@@ -0,0 +1,7 @@
+#!/bin/sh
+# TODO: use getopt to avoid parsing options as filenames,
+# and to support -- and --help
+for i in "$@"
+do
+sed -e '1!G;h;$!d' "$i"
+done