summaryrefslogtreecommitdiff
path: root/sh/lastarg
diff options
context:
space:
mode:
Diffstat (limited to 'sh/lastarg')
-rwxr-xr-xsh/lastarg5
1 files changed, 5 insertions, 0 deletions
diff --git a/sh/lastarg b/sh/lastarg
new file mode 100755
index 0000000..b52afcd
--- /dev/null
+++ b/sh/lastarg
@@ -0,0 +1,5 @@
+#!/bin/sh
+# usage: lastarg "$@"
+
+shift $(($# - 1))
+echo "$1"