How do I export an environment variable from within a Ruby script to the parent shell? For example, implementing a naïve implementation of the read Bash builtin:
#!/usr/bin/ruby
varname = ARGV[0]
ENV[varname] = STDIN.gets # but have varname exported to the parent process
...
I am curious if there is any history behind why the ^ character is used to escape the special characters <, >, |, &, and ^ in environment variable names in Windows instead the \ character that is typically used to escape special characters.
Please note that I realize there may be no reason for this, but I'd be interested to hear if ther...
Hello.
I was wondering if there is the best practice on where to store global settings in a rails app. What I mean by that is i.e: I have a few globals defined that may change, but not likely and it seems inappropriate to store them in DB since they are used so much. For instance I have SYSTEM_EMAIL & SYSTEM_EMAIL_SIGNATURE & SYSTEM_STO...
Hi
I'm installing Oracle XE and sqlplus on Oracle Enterprise Linux 5.
What environment variables do I need?
I think that both require different ORACLE_HOME and LD_LIBRARY_PATH.
Thanks
...
I'm trying to execute a program (convert from ImageMagick, to be specific) whose parent folder exists on the path. Ergo, when I run convert from the command line, it runs the command. The following, however, fails:
String command = "convert"
CommandLine commandLine = CommandLine.parse(command);
commandLine.addArgument(...)
...
int exitV...
I have my Apache web server fronting a Rails application. When a request comes in one of the Apache modules looks at the request and puts information into an Apache environment variable. My question is, is there a chance that one request can overwrite the environment variable of another request and have things get mixed up in the Rails l...
I want to schedule a task on linux by icrontab, and the task is written in python and have to
import cx_Oracle module, so I export ORACLE_HOME and LD_LIBRARY_PATH in .bash_profile, but
it raise the error:
libclntsh.so.11.1: cannot open shared object file.
Since it is ok to run the task by issue the command in shell like
python a.p...
In any major package for Linux, running ./configure --help will output at the end:
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS ...
I am creating a Makefile which I want it to be a single file for different architectures, OSes, libraries, etc. To do this I have a build specific XML file which defines the different configuration options for each architecture. The config file is read by Perl (it could be any language) and the Perl output returns something like:
var1...
I am running a rails app locally through NetBeans which seems to be running ruby through mingw32. I'm trying to do a system call to lame, which works fine using just irb, but this particular setup can't find it!
What can I do to tell mingw/this instance of rails where lame is?
...
I have a java program that fires off an executable using the Runtime.exec() method. I'm using the variant that takes in a set of command line params as one argument, and some environment variables as another argument.
The environment variable I'm tryign to set is path, so i'm passing in "PATH=C:\some\path". This does not work. Is there...
I basically want to debug a cgi programm with gdb by emulating the environment variables and stdin stream.
How do I set the variables and stdin?
I am using lampp and gdb.
Thanks!
...
I pulled a stupid and accidentally committed a folder named ${env.CATALINA_HOME} to my subversion repo. I tried doing an svn rm /path/to/${env.CATALINA_HOME} but it says "bad substitution" which I'm guessing means that it cant figure out why i'm using ${} notation in the path. I also tried surrounding the path in quotes, to no avail.
Su...
If I have 'export BLA="hey there"' in .profile in my home directory, how can I change this later in other directories just by cd into the other directory?
Also, is there a way to just set a new environment variable when I cd into a directory.
My first attempt was to just make another .bashrc file in the directory where I want the change...
I want to differentiate between Windows XP and Windows 7 in a XML file. Thought i will use an environment variable for it inside the XML.
However I could not find any system environment variable defined in windows that gives this information.
I see the %OSTYPE% variable but it is only available in Windows 7. It is not defined in XP. ...
Hi,
I was wondering if someone manage to reference files (except headers or lib) with an environment variable in XCode (mine : v3.2.1) ?
There are settings that specify search paths for headers (HEADER_SEARCH_PATHS), libs (LIBRARY_SEARCH_PATHS), and even Carbon Resource (REZ_SEARCH_PATH). But how can I reference other file types for re...
What characters are allowed in linux environment variable names? My cursory search of man pages and the web did only produce information about how to work with variables, but not which names are allowed.
I have a Java program that requires an defined environment variable containing a dot, like com.example.fancyproperty. With Windows I c...
I want to initialize my Cygwin environment with a variable coming from a batch file
@set myvar=test
%BASH% --login -c "set"
REM hope to see myvar
So I want myvar with its value eventually be available in bash.
...
First off I'm running Ubuntu 9.10
I've edited the /etc/environment file to look like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20"
CLASSPATH="/home/travis/freetts/lib/freetts.jar:/home/travis/freetts/lib/jsapi.jar:."
I then run "source /etc/environmen...
We need to test a java build with the languages set to different values. I can manually (i.e. via export LANG=en_DK.UTF-8 and export LANG=en_DK) test that the unit tests run with the ant build script behaves differently, but I need to set the environment variable from ant. I have tried setting it using these methods (with the shell $LANG...