Please help in knowing what is the usage of .
in Unix scripting.
For example:
. /apps/Infor_shar/PSSRT/PSHUP/prsm/psnp_env
Please help in knowing what is the usage of .
in Unix scripting.
For example:
. /apps/Infor_shar/PSSRT/PSHUP/prsm/psnp_env
The dot command (.
) is a command that runs the shell script given on its command line (sometimes called a "dot-script") in the current shell's environment. This means that any variable assignment, function declaration, change of the current working directory, or other changes to the given script's environment, will stay visible once the script has finished running.
Since the script is executed by the current shell, a #!
-line at the start of such a script will be ignored.
In some shells, the standard .
command is aliased to a source
command.
psnp_env
. – floydn Feb 08 '23 at 21:42