General :: Existence Of USER Environment Variable In The Shell?

Jan 28, 2010

I heard (although I can't find any sources for proof) that the USER environment variable may not be set in a old Unix shells (maybe even some obscure shells as well). What is the probability that it won't be set?

View 2 Replies


ADVERTISEMENT

General :: Environment Variable And Current Shell

May 24, 2010

I am using Red Hat Linux Enterprise 5. I know the theory that -- using export to set environment variable, the environment variable will apply to current and child environment, but without using export to set environment variable, the environment variable will only apply to the current environment. What is the exact definition of "child environment" and "current environment"? For example,

Code:
$ var1=123
$ echo "Hello [$var1]"
The value of var1 (which is 123) is printed in shell, but I think echo is a command invoked by current shell, and it (the echo command) should be a child environment of current shell and the value of var1 should not (because not using export var1=123) impact echo.

View 13 Replies View Related

Server :: Difference Between CGI And SHELL Environment Variable?

Sep 8, 2009

I have a application on linux , I can excute it in command line . but when I invoked it via CGI(perl) , it can not excute successfully , so I suspected that there is something different between SHELL and CGI environment , but I haven't figure out what the difference is .

View 3 Replies View Related

General :: Set Environment Variables For A Particular User On C Shell Configurations?

Jun 2, 2011

I have been give a task of replicating one of our production systems to create a test system. I have been restricted to use c shell to set up its environment variables. I am new to this my questions is how do i set environment variables for a particular user on c shell e.g ORACLE_HOME and ORACLE_SID permanently for a particualar user i know in bash you edit the .bash_profile file. What do i do for c shell?

View 2 Replies View Related

General :: Create An Environment Variable With The PRINTER Variable?

Apr 16, 2011

I am supposed to create an environment variable with the PRINTER variable, which should resolve to the word sales. Would the command be like this?: env PRINTER - NAME=SALES (is this the command to create that variable with resolving the word sales to it?)

View 3 Replies View Related

Software :: Pass To Shell Environment As Regular User / Will It Apply To Builds Ran Under Sudo?

Jan 17, 2011

If I pass to my shell environment as a regular user will it apply to builds ran under sudo?I posted a thread similar to this regarding a build with TOR; however, this is applicable to all programs.

View 6 Replies View Related

General :: Where Is The $HOME Environment Variable Set

Apr 17, 2011

I'm looking for the place where $HOME environment variable set. It is after login, to my mind.

I'm using Linux debian 2.6.32-5-686.

View 3 Replies View Related

General :: Set Environment Variable With A Given Script?

Nov 23, 2009

i have to set environment variables , after the installation of intel(R)MKL for linux OS given in intel mkl user guide, which are INCLUDE, LD_LIBRARY_PATH, MANPATH,LIBRARY_PATH, CPATH, FPATH, NLSPATH using the script file which, in my case,is "mklvarsem64t.sh"How can i set these environment variables?Do i need to set all these variables?

View 2 Replies View Related

General :: Set The PATH Environment Variable?

Apr 25, 2011

set the PATH environment variable?

View 4 Replies View Related

General :: How To Save Environment Variable From Terminal

May 14, 2011

I am trying to save the PATH environment variable from the Terminal running on a Ubuntu system.I typed in the following however it does not get saved.

export PATH=/home/david/Komodo-Edit-6/bin/:$PATH

View 1 Replies View Related

General :: Adding An Environment Variable To Inittab?

Jul 22, 2010

im quite new to Unix stuff Im in need to add a script to be executed, in to /etc/inittab for that i need to get the path to my java installation. I have set the JAVA_HOME env variable already, my question is whether we can use JAVA_HOME in inittab? i mean, are those env variables are crated by the time inittab starts? if so, how can i add the entry

currently im having is like this
pse:5:respawn:su - <username> -c "$JAVA_HOME/other-path/pp.sh run"
is there any issue with the syntax?

View 2 Replies View Related

General :: Adjusting The PKG_CONFIG_PATH Environment Variable?

Sep 14, 2010

i ran into a problem while isntalling xine player on fedora 11, i first of all installed its core engine 'xine-lib' successfully with standard prefix! when i run the './configure' for its frontend (xine-ui) it gives this error.

No package 'libxine' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XINE_CFLAGS and XINE_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.

View 4 Replies View Related

General :: Set Current Directory As Environment Variable

Jul 10, 2010

How do you set current directory (full path) in an environment variable?

View 10 Replies View Related

General :: Changing The Environment Variable Permanently In Ubuntu 10.10

Apr 30, 2011

I want to make change to environment PATH system wide. Because I have program called "md5". I want to execute it from anywhere (i.e any directory).

My md5 program is located at "/home/ahuq/MappingServer/md5_program". So what I did was to put: "export PATH=$PATH:/home/ahuq/MappingServer/md5_program" in the running SHELL.

This only makes temporary changes and lets me run the "md5" program from anywhere temporarily.

But I want to make this change permanent. So what I did was to put the "PATH=$PATH:/home/ahuq/MappingServer/md5_program" line into the "/etc/environment" file.

This screwed everything up and then for a while I couldn't execute anything from SHELL. I knew the absolute path of "nano" editor and used it to modify the file (i.e. /etc/environment) back to its original condition.

This fixed the problem and now I can run programs like "ls" from the SHELL.

But still I need a way to permanently add the path of "md5" to the environment. How can I do this in Ubuntu 10.10? Which file needs to edited?

Do I just logout or do I have to restart the system to make the changes active?

View 6 Replies View Related

General :: Environment Variable Containing The Current Keyboard Layout?

May 18, 2010

I have two keyboard layouts installed in my system and I need to determine in scripts which one I'm on. What the environment variable contains indicator of current keyboard layout?

Debian GNU/Linux 5.0.4;
GNOME 2.22.3.

View 1 Replies View Related

Programming :: Assign Value Of C Variable To Shell Variable?

Apr 28, 2010

included shell script inside c program, and i wanted to assign the value of c variable to shell variable..Can any one please suggest me how to do it?

View 8 Replies View Related

General :: $HOME/.bashrc Disabled When User Shell Is 'rbash' (restricted Shell)?

Jun 15, 2011

MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.

View 2 Replies View Related

General :: Shell Script Variable Usage ?

Feb 9, 2010

Having real problem with below:

If I do:

I get the result I want (a file in format of <name><yyyy>-<mm>-<dd>.zip cut down to just yymmdd); but not if I try to set it as a variable ...

View 2 Replies View Related

General :: Shell Script -- Awk Variable Substitution?

Oct 7, 2010

I have a script in which I'm reading a file line by line and I'm finding certain position value using awk index as

Code:
# 2 spaces before open parens
pos=`echo | awk -v Line="$Line" '{ print index("'"$Line"'"," (")}'`

[code]....

View 2 Replies View Related

General :: Assigning Value To A Variable In Shell Script?

Nov 22, 2010

Why doesn't "var1=`echo $var2 | grep pattern`" work ?

View 8 Replies View Related

General :: Variable Declaration In Shell Scripts?

Feb 4, 2010

We have a file that declares many environmental variables. Out of which I have doubt on few. These variables are declared in UNIX environment. We are planing to migrate them along with applications to Linux.

Code:
export MAILSERVER="%new@hub"
MAIL_USERS="vinay.new"{MAILSERVER}",vijay.new"{MAILSERVER}
Does the above declarations work in Linux ?
The above declarations expands to
Code:
mail vinay.new%new@hub,vijay.new%new@hub
which looks little wierd.

[Code]...

View 4 Replies View Related

Software :: Export A Variable To Parent Shell In Shell Scripting?

May 21, 2009

Is there a way to export a variable to parent shell in shell scripting ?

View 3 Replies View Related

General :: Storing A Variable In A Shell Script After Awk Output?

Feb 8, 2010

On command line I have no problem storing a variable e.g

Code:

:~/bin$ process=`ps -ef | awk ' $8 == "idesk" { print $2 }'`
:~/bin$ echo $process
26736
:~/bin$

When I try to incorporate this into a shell script I get a blank.

Code:

:~/bin$ cat process_idesk
#!/bin/bash
process=`ps -ef | awk ' $8 == "idesk" { print $2 }'`

[code]....

The process_idesk script has been chmoded to be executable by the user. I'm sure there must be a silly omission on my behalf.

View 3 Replies View Related

General :: Shell Script - Use Variable In A For Loop With Directory Path?

Jan 19, 2011

I modified files in several directories, and need to run a diff on the backup I created before modifying the file.

I'm trying to compose a simple shell script to speed up the task, but getting a syntax error.

Here is what I have:

for i in DIR1 DIR2 DIR3 DIR4 DIR5 do;
diff /maindir/subdir/subdir/$i/filename.txt.old /maindir/subdir/subdir/$i/filename.txt;
done

I know the paths are valid, and if I run just the diff command with the actual DIR1 instead of $i it works.

View 2 Replies View Related

General :: Write A Shell Script That Allows Only User 1 And User 2 To Execute A Program?

Feb 25, 2010

I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?

View 1 Replies View Related

General :: Login As Other User Using Shell Doesn't Load The Profile For That User?

Dec 11, 2009

I am using the sudo command to log on locally as another user by the following command:

sudo -u theotheruser -s
or
sudo -u theotheruser sh

As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.

View 11 Replies View Related

General :: Shell Script Is Showing Error After Whenever Checking A Special Variable

May 29, 2011

I have created a shell script to customise mv command, now i have achieved to accomplish all the functionality of mv by using alias. But i found difficulty in accomplish the funcionality with options [Like mv -i or mv -f etc.]. I thought about logic which check the first argument whether its starting with a minus [-] or not. if its starting with argument it will set a flag and execute accordingly. But whenever this condition is checked it shell script will throw error of destination operand missing. But the same will work with out option.

Note: I have used an minus[-] expression for decreasing a counter on the script above. The below mentioned is the portion of script. Sry for troubling Im not gud @scripting.

for i in $*
do
{
argument=`expr $argument - 1`
if [ $argument = 0 ];
then
exit
[Code]....

View 5 Replies View Related

Debian :: Cannot Add Environment Variable

Apr 27, 2015

I'm trying to add 2 new environment variables (Debian . I have created a "/etc/profile.d/java.sh" file and in it I have added these lines (and just for the record, I've also tried adding those line to the profile file with the same results as explained below).

Code: Select allexport XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/X11/app-defaults

export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v85/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v85/bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime/v85/sys/os/glnxa64

The first variable "XAPPLRESDIR" is added just fine (I check by doing echo $XAPPLRESDIR). The second variable is not added. Here's what I discovered though, if I change the variable name to LD_LIBRARY_PATK (I change the word "path" into something else) then it works just fine... So how am I supposed to add this variable? I need it to be named just that...

View 1 Replies View Related

Ubuntu :: How To Set Environment Variable

Jun 28, 2010

Well on a Rsps forum it says that the reason i keep crashing in the client is cause my Envieronment Variable isnt set for Java. i was wondering how to do this.please make it deatailed since i am new to ubuntu and i dont know most of the things like usr/java

View 9 Replies View Related

Software :: How To Set Environment Variable

Mar 8, 2011

how to set environment variable as i am getting following message during ./configure.

checking for GtkGLExt - version >= 1.0.0...
*** pkg-config cannot find gtkglext-1.0 >= 1.0.0
*** Set the environment variable PKG_CONFIG_PATH to point to the correct

[code]...

View 18 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved