Fuego wiki

Login or create account

function is abs path

NAME [edit section]


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)
Usage within an if-else statement:
      if is_abs_path $MYFILEPATH; then
        echo "absolute path"
        echo "relative path"

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/

SEE ALSO [edit section]

TBWiki engine 1.8.3 by Tim Bird