Mailinglist Archive: opensuse (818 mails)

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

Ah, ok, let me see if I comprehend this correctly. So the first example
won't create a child process

Nearly right :) The shell always creates a new process, be it for
binary programs or an interpreter for a script (a shell, sed, awk,
perl etc.). As others wrote, '.' means "let the current shell run the
given script".

But the second example will create a child process because by using the
/myscript.sh, the current directory is automatically included in PATH
(indicated by the /, which puts some kind of root action on the call?),

No. A normal user has '.' in his/her path by default, as you can check
by doing 'echo $PATH'. The user root doesn't have '.' in PATH for the
reasons I wrote.

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

< Previous Next >