Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] different types of shell scripts
On 09/23/2011 05:02 PM, Philipp Thomas pecked at the keyboard and wrote:
On Thu, 22 Sep 2011 21:13:16 +0800, George Olson<grglsn765@xxxxxxxxx>

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
/, 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.


Normal users on my unmodified (never changed the default path) systems do not have a "." in their path.

Ken Schneider
SuSe since Version 5.2, June 1998
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >