function is abs path
NAME [edit section]
is_abs_path
SYNOPSIS [edit section]
is_abs_path <path>
DESCRIPTION [edit section]
Checks if the supplied path is absolute (starts with /) or relative.
EXAMPLES [edit section]
Here are some sample invocations:is_abs_path /usr/share/foo (returns 0) is_abs_path foo (returns 1)
if is_abs_path $MYFILEPATH; then echo "absolute path" else echo "relative path" fi
ENVIRONMENT and ARGUMENTS [edit section]
- $1 is the path argument
RETURN [edit section]
Returns 0 if the path is absolute and 1 otherwise.
SOURCE [edit section]
Located in scripts/functions.sh
SEE ALSO [edit section]