aboutsummaryrefslogtreecommitdiff
path: root/bin/pp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pp')
-rwxr-xr-xbin/pp14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/pp b/bin/pp
new file mode 100755
index 00000000..d9e45f92
--- /dev/null
+++ b/bin/pp
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Print the full path to each argument; file need not exist
+for arg ; do
+ case $arg in
+ */*)
+ dir=$(cd -- "${arg%/*}" ; printf '%s/' "$PWD")
+ dir=${dir%/}
+ ;;
+ *)
+ dir=$PWD
+ ;;
+ esac
+ printf '%s/%s\n' "$dir" "${arg##*/}"
+done