Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] different types of shell scripts
On Thu, 22 Sep 2011 16:11:03 +0800, George OLson <grglsn765@xxxxxxxxx>
wrote:

<dot><space><filename>, for example "#> . myscript.sh"

That runs a given shell in the context of the current shell, i.e. no
child process is created.

<dot><slash><filename>, for example "#> ./myscript.sh"?

This means "run the script myscript.sh in the current directory. The
'./' is needed for the user root as he doesn't have the current
directory in his search path for executable code (set via the
environment variable PATH) as that would make it easy to trick him
into executing dubious code that just happens to have the name of a
common command. As a normal user it only speeds up starting the script
as then the shell doesn't have to search PATH.

hth
Philipp
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
References