1DOT(1P)                    POSIX Programmer's Manual                   DOT(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       dot - execute commands in the current environment
13

SYNOPSIS

15       . file
16

DESCRIPTION

18       The shell shall execute commands from the file in the current  environ‐
19       ment.
20
21       If  file  does not contain a slash, the shell shall use the search path
22       specified by PATH to find the directory containing file. Unlike  normal
23       command  search, however, the file searched for by the dot utility need
24       not be executable. If no readable  file  is  found,  a  non-interactive
25       shell  shall  abort; an interactive shell shall write a diagnostic mes‐
26       sage to standard error, but this condition shall not  be  considered  a
27       syntax error.
28

OPTIONS

30       None.
31

OPERANDS

33       See the DESCRIPTION.
34

STDIN

36       Not used.
37

INPUT FILES

39       See the DESCRIPTION.
40

ENVIRONMENT VARIABLES

42       See the DESCRIPTION.
43

ASYNCHRONOUS EVENTS

45       Default.
46

STDOUT

48       Not used.
49

STDERR

51       The standard error shall be used only for diagnostic messages.
52

OUTPUT FILES

54       None.
55

EXTENDED DESCRIPTION

57       None.
58

EXIT STATUS

60       Returns  the  value of the last command executed, or a zero exit status
61       if no command is executed.
62

CONSEQUENCES OF ERRORS

64       Default.
65
66       The following sections are informative.
67

APPLICATION USAGE

69       None.
70

EXAMPLES

72              cat foobar
73              foo=hello bar=world. foobar
74              echo $foo $bar
75              hello world
76

RATIONALE

78       Some older implementations searched the current directory for the file,
79       even  if  the  value  of PATH disallowed it.  This behavior was omitted
80       from this volume of IEEE Std 1003.1-2001 due to concerns  about  intro‐
81       ducing  the susceptibility to trojan horses that the user might be try‐
82       ing to avoid by leaving dot out of PATH.
83
84       The KornShell version of dot takes optional arguments that are  set  to
85       the  positional parameters. This is a valid extension that allows a dot
86       script to behave identically to a function.
87

FUTURE DIRECTIONS

89       None.
90

SEE ALSO

92       Special Built-In Utilities
93
95       Portions of this text are reprinted and reproduced in  electronic  form
96       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
97       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
98       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
99       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
100       event of any discrepancy between this version and the original IEEE and
101       The Open Group Standard, the original IEEE and The Open Group  Standard
102       is  the  referee document. The original Standard can be obtained online
103       at http://www.opengroup.org/unix/online.html .
104
105
106
107IEEE/The Open Group                  2003                              DOT(1P)
Impressum