mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: 20 Newsgroups Example
Date Fri, 20 Mar 2009 21:44:15 GMT
Does this part of the manual for bash help?


       When bash is started non-interactively, to  run  a  shell  script,
for
       example, it looks for the variable BASH_ENV in the environment,
expands
       its value if it appears there, and uses the expanded value as the
name
       of  a  file to read and execute.  Bash behaves as if the following
com-
       mand were executed:
              if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
       but the value of the PATH variable is not used to search for  the
file
       name.


In particular setting BASH_ENV on the local side and then using -o
SendEnv=true might do something useful (or not!).

There is also a hadoop-env.sh file in the hadoop configuration that might be
useful.  You could do something like . ~/bash_profile there.

None of these are good answers.  I have exactly the same problem with lots
of my EC2 invoking scripts.  There, I build a script, throw it over to the
new instance and the first few lines source key profile files.  Not a good
solution, but at least it works.  For Mahout running hadoop, this is a whole
lot less viable.

On Fri, Mar 20, 2009 at 2:25 PM, Jeff Eastman <jdog@windwardsolutions.com>wrote:

> I'm out of my depth here. I'm just using the default OS-X bash shell and it
> uses .bash_profile not .bashrc. I tried creating .bashrc and it did not
> solve the problem that Ted's snippet verified:
>
> ssh localhost env | grep JAVA
>
> returns nothing.
>
> Jeff
>
> Sean Owen wrote:
>
>> Ah, solution -- add this to .bashrc, not .profile. That's the one bash
>> uses for non-interactive shells. Now I remember.
>>
>> On Fri, Mar 20, 2009 at 7:15 PM, Ted Dunning <ted.dunning@gmail.com>
>> wrote:
>>
>>
>>> ssh with a command does not log in, but instead works like a subshell
>>> command.
>>>
>>> Try [ssh localhost env | grep JAVA].  That may give different results
>>> than
>>> ssh to localhost with an interactive shell.
>>>
>>>
>>
>>
>>
>>
>
>


-- 
Ted Dunning, CTO
DeepDyve

111 West Evelyn Ave. Ste. 202
Sunnyvale, CA 94086
www.deepdyve.com
408-773-0110 ext. 738
858-414-0013 (m)
408-773-0220 (fax)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message