DOT(1)                     POSIX Programmer's Manual                    DOT(1)



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


NNAAMMEE
       dot -- execute commands in the current environment

SSYYNNOOPPSSIISS
       . _f_i_l_e

DDEESSCCRRIIPPTTIIOONN
       The shell shall execute commands from the _f_i_l_e in the current
       environment.

       If _f_i_l_e does not contain a <slash>, the shell shall use the search path
       specified by _P_A_T_H to find the directory containing _f_i_l_e.  Unlike normal
       command search, however, the file searched for by the _d_o_t utility need
       not be executable. If no readable file is found, a non-interactive
       shell shall abort; an interactive shell shall write a diagnostic
       message to standard error, but this condition shall not be considered a
       syntax error.

OOPPTTIIOONNSS
       None.

OOPPEERRAANNDDSS
       See the DESCRIPTION.

SSTTDDIINN
       Not used.

IINNPPUUTT FFIILLEESS
       See the DESCRIPTION.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       See the DESCRIPTION.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       Not used.

SSTTDDEERRRR
       The standard error shall be used only for diagnostic messages.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       If no readable file was found or if the commands in the file could not
       be parsed, and the shell is interactive (and therefore does not abort;
       see _S_e_c_t_i_o_n _2_._8_._1, _C_o_n_s_e_q_u_e_n_c_e_s _o_f _S_h_e_l_l _E_r_r_o_r_s), the exit status shall
       be non-zero. Otherwise, return the value of the last command executed,
       or a zero exit status if no command is executed.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

EEXXAAMMPPLLEESS
       cat foobar
       ffoooo==hheelllloo bbaarr==wwoorrlldd
       . ./foobar
       echo $foo $bar
       hheelllloo wwoorrlldd

RRAATTIIOONNAALLEE
       Some older implementations searched the current directory for the _f_i_l_e,
       even if the value of _P_A_T_H disallowed it. This behavior was omitted from
       this volume of POSIX.1-2008 due to concerns about introducing the
       susceptibility to trojan horses that the user might be trying to avoid
       by leaving ddoott out of _P_A_T_H.

       The KornShell version of _d_o_t takes optional arguments that are set to
       the positional parameters.  This is a valid extension that allows a _d_o_t
       script to behave identically to a function.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _S_e_c_t_i_o_n _2_._1_4, _S_p_e_c_i_a_l _B_u_i_l_t_-_I_n _U_t_i_l_i_t_i_e_s, _r_e_t_u_r_n

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
       event of any discrepancy between this version and the original IEEE and
       The Open Group Standard, the original IEEE and The Open Group Standard
       is the referee document. The original Standard can be obtained online
       at http://www.unix.org/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2013                               DOT(1)
