|
ECS Home Automation and Security Archives |
learn more
| view messages for this
month | NetBloc® | terms of use | search
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects
Subject: From: Date: | Re: Linux Progress Ingo Pakleppa 17 Sep 2003 21:50:21 -0700 |
Rick's suggestion is excellent. I was going to say "can't be done" but
Rick proved me wrong (by the way, it is "dot space shellscriptname
arguments"). Although I think this is a very problematic approach for
other reasons.
Normally, the first thing a shell script does is launch another instance
of the shell. Everything you do happens in this new process, separate
from the shell that launched it. This is why Linux scripts can be so
much more powerful than DOS/Windows scripts - in Windows, scripts need
to be very careful not to change anything with global effects, restore
directories, etc.
And this is where the problem comes in: if you follow Rick's approach,
you are exposing all the internal workings of the script that you
execute to the main shell you are working in.
This way of executing a script is only intended for "include files"
(shell scripts that aren't designed to run on their own, but rather
provide features for other shell scripts).
Also, note that in Linux, "cd" is not global - in fact, the concept of a
current directory is far less meaningful than it is in the DOS/Windows
world.
Ingo
From:
Mark Gilmore
<mark@markgilmore.net>
To:
ecs@netbloc.com
Subject:
Re: [ecs]
Linux
progress
Date:
Wed, 17 Sep
2003
05:26:53
-0700
say what ? :-)
At 10:15 PM 9/16/2003 -0700, you wrote:
> Mark,
>
> Try this " . .sh"
>
> Rick Mortensen
> www.can-be-scanned.com/HomeAutomation
> ----- Original Message -----
> From: "Mark Gilmore" <mark@markgilmore.net>
> To: <ecs@netbloc.com>
> Sent: Tuesday, September 16, 2003 18:02
> Subject: [ecs] Linux progress
>
>
> > A re-install seems to have eliminated all my connection
> problems :-).
> > I can now connect and transfer files in both directions.
> > ECS is virtually compiled (a few lines yet to fix up).
> > I will begin testing it tomorrow.
> >
> > I would still like to know how to run a .sh, such that the
> result
> > would be *exactly* as if I typed the commands in the .sh.
> > For example, I want to use .sh files to CD to other folders.
> >
> > Mark Gilmore
> > http://OmnipotenceSoftware.com
> >
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects