#!/bin/sh # return "abs" if input path absolute and "rel" if input path relative firstchar=`echo $1 | awk '{ print substr($0,1,1) }'` if [ $firstchar = / ]; then echo "abs" else echo "rel" fi