1SHTOOL-PATH.TMP(1)          GNU Portable Shell Tool         SHTOOL-PATH.TMP(1)
2
3
4

NAME

6       shtool path - GNU shtool command dealing with shell path variables
7

SYNOPSIS

9       shtool path [-s|--suppress] [-r|--reverse] [-d|--dirname]
10       [-b|--basename] [-m|--magic] [-p|--path path] str [str ...]
11

DESCRIPTION

13       This command deals with shell $PATH variables. It can find a program
14       through one or more filenames given by one or more str arguments.  It
15       prints the absolute filesystem path to the program displayed on
16       "stdout" plus an exit code of 0 if it was really found.
17

OPTIONS

19       The following command line options are available.
20
21       -s, --suppress
22           Supress output. Useful to only test whether a program exists with
23           the help of the return code.
24
25       -r, --reverse
26           Transform a forward path to a subdirectory into a reverse path.
27
28       -d, --dirname
29           Output the directory name of str.
30
31       -b, --basename
32           Output the base name of str.
33
34       -m, --magic
35           Enable advanced magic search for ""perl"" and ""cpp"".
36
37       -p, --path path
38           Search in path. Default is to search in $PATH.
39

EXAMPLE

41        #   shell script
42        awk=`shtool path -p "${PATH}:." gawk nawk awk`
43        perl=`shtool path -m perl`
44        cpp=`shtool path -m cpp`
45        revpath=`shtool path -r path/to/subdir`
46

HISTORY

48       The GNU shtool path command was originally written by Ralf S.
49       Engelschall <rse@engelschall.com> in 1998 for Apache. It was later
50       taken over into GNU shtool.
51

SEE ALSO

53       shtool(1), which(1).
54
55
56
5718-Jul-2008                      shtool 2.0.8               SHTOOL-PATH.TMP(1)
Impressum