Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] different types of shell scripts
  • From: Roger Oberholtzer <roger@xxxxxx>
  • Date: Thu, 22 Sep 2011 13:22:35 +0200
  • Message-id: <1316690555.21158.49.camel@acme.pacific>
On Thu, 2011-09-22 at 10:48 +0200, Carlos E. R. wrote:
Hash: SHA1

On 2011-09-22 10:42, jdd wrote:
and reading again using ". filename" seems mostly the same as running
"filename" alone

It was done inside scripts to load environment variables from another
script. Ie, it reuses the same shell, makes sense.

Not really. If the script changes, say, the PATH, it will then be
changed for your shell as well. You may also wind up in some other place
when it is done. Sourcing a script should only be done if the script is
intended specifically for this purpose. I would never do this to a
script that installs software.

Yours sincerely,

Roger Oberholtzer

OPQ Systems / Ramböll RST

Office: Int +46 10-615 60 20
Mobile: Int +46 70-815 1696

Ramböll Sverige AB
Krukmakargatan 21
P.O. Box 17009
SE-104 62 Stockholm, Sweden

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

< Previous Next >
Follow Ups