drieux, et al --

I promise that I can keep this on topic, folks...

...and then drieux said...
% 
% On Tuesday, June 4, 2002, at 04:58 , David T-G wrote:
% 
% volks,
% 
% the reason that the grass is moving around, is
% not that there is an earthquake, merely that the elephants
% are dancing the polka here - nothing serious....

*grin*


% 
...
% >How lovely.  See, I knew there was someone here who could say it better.
% >I said it first, though :-)
% 
% NEEEENEEER NEEENEEER NEEENEEER!!!![1]

*grin*


% 
% >I'm just happy I came up with the right
% >split grammar; it took me three tries!
% 
% yes - and you left the person with a REALLY UGLY piece
% of slaven portage from /bin/sh to perl - without even so

Hmmm...  Perhaps so.


% much as a peek forward to where and how he can start thinking
% about doing things better....

I suppose I should do a better job of thinking forward; at the moment I'm
still just getting the hang of this stuff :-)


% 
% Raw Portage is fine for folks in the boundary water canoe area,
% but we really should be trying to help grease the hump of the
% camel so that they can slide right on through to module maintenance.

Ah -- but part of the problem is that I can hardly find the hump myself!
I'm scrounging around just as much as he is, and doubtless much less than
many others here, not even counting you experts who are kindly here to
shepherd us along...


% 
% or did you mean this recent piece
% 
%       foreach $p ( split(/:/,$ENV{PATH}) ){
%               print "$p\n"
%       }
% 
% once we unGlunge it from the 'perl -e'....

Not sure what you mean; I thought that your version was more mature than
mine, and that was the "say it better" that I meant.


% 
% >...
% >% since the person clearly wants to effectively use this in a
% >% real perl script and not merely....
% >
% >Well, yeah, probably, but we still haven't covered where he's getting the
% >PATH and what he's doing with it...
% 
% we agree - the quality of beginners, is well, so beginning....

Don't *I* know that! :-)


% and this cat knows enough to grok that he can use split() - just
% not how SICK playing with split() can get....

Hmmm...  Perhaps I should be scared...


% 
% the concern is parsing out 'a users $PATH variable' - the scary
% part is whether the cat is going to park the script in say
% 
%       /usr/local/bin

Agreed.


% 
% and then ask them to run it - or is this our classical concern of
% how to make sure that the PATH contains the elements we need to
% make sure are there - so that the rest of the script will work
% based upon our core coding assumption that

Any reason, BTW, not to just prepend the path element(s) and move on?


% 
%       foo
% 
% will be found in the path - as you noted I had to quickly clean
% up to make sure it was there for the pingIt problem... Where I


Exactly.


% merely pre-pend rather than worry about the fact that such a strategy
% can park extra grot in the PATH environmental - hence obliging a
% 'rehash' sequence' etc, etc, when invoking the child shell...

Now I'm confused again.  So I have a shell and it's current path is

  /usr:/usr/bin:/usr/local/bin

and my script comes along.  When the script runs, it gets the environment
from the shell -- but is the path hash table included in that?

So then I prepend to the path, either something not there like

  /usr/sbin

or perhaps something already there like

  /usr/bin

just because I'm lazy (oh, yes, I realize that not looking first is being
quite lazy... but is there a cost?).  When the subshell is spawned off by
perl for whatever reason, it is handed the [new] $PATH and it has to
build its path hash table from scratch anyway, right?  So what does it
matter that one puts stuff at the front of the path, then?  [Or am I lost
again?]


% 
...
% >store the path dirs for later, then it seems quite valid to spit through
% >the elements and iterate them without storing them in an array in the
% >meantime.
% >
% >Doesn't it?
% 
% great closure point....

Oh, dear.  I fear I've been misunderstood.  Instead of picturing the
triumphant debate champion standing, flushed with the thrill of battle,
victorious across from his opponent with the challenge of refute cast
before him, picture the timid wanderer, far from home in a foreign land,
learning to speak the strange tongue and thinking that he has ordered a
nice meal but want to make sure that he hasn't instead invited a flogging
over an open fire.

Perhaps I could have written

  *whimper* Doesn't it? *whimper*

to be more clear :-)


% 
% One idea I was thinking of would be something along the line of
% 
% cf - http://www.wetware.com/drieux/pbl/Sys/Admin/prependEnv.txt

Off to look at another script...  I love that these are all there but
this business of going off to the web is such a pain :-)


% 
% so you are going to buy some overHead somewhere of some type....
% this is life, there are no free lunches.....

Fair enough.


% 
% [..]
% david - i'll get back to you in a bit on the ENV path
% dysfunctionality - the fact that it still has the 'sgi'
% there tells you how old that .login is....

*grin*


% 
% at least I commented out the uuwho/uupath aliases since
% we are no longer maintaining the lat/longs......

Hey, at least you're moving ahead!  Maybe not in the current century, but
back within the sliding window ;-)


% 
% ciao
% drieux
% 
% ---
% 
% [1] way techNoir alternative to:
% 
%       "yeah, and your code smells funny too...."

*grin*


HAND

:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg25432/pgp00000.pgp
Description: PGP signature

Reply via email to