function is abs path in split format
|
= NAME =
is_abs_path
|
|
= SYNOPSIS =
is_abs_path <path>
|
|
= DESCRIPTION =
Checks if the supplied path is absolute (starts with /) or relative.
|
|
= EXAMPLES =
Here are some sample invocations:
{{{#!YellowBox
is_abs_path /usr/share/foo (returns 0)
is_abs_path foo (returns 1)
}}}
Usage within an if-else statement:
{{{#!YellowBox
if is_abs_path $MYFILEPATH; then
echo "absolute path"
else
echo "relative path"
fi
}}}
|
|
= ENVIRONMENT and ARGUMENTS =
* $1 is the path argument
|
|
= RETURN =
Returns 0 if the path is absolute and 1 otherwise.
|
|
= SOURCE =
Located in ''scripts/functions.sh''
|
|
= SEE ALSO =
|