Scala/tools/abspath

9 lines
194 B
Bash
Executable File

#!/bin/sh
#
# print the absolute path of each argument
for relpath in $* ; do
D=`dirname "$relpath"`
B=`basename "$relpath"`
echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
done