General :: Why Can't Set Environment Value In My BASH Script
Jun 20, 2010For example
Code:
I run "echo $PATH" after this script. The "/opt/bin" don't append to "PATH".
For example
Code:
I run "echo $PATH" after this script. The "/opt/bin" don't append to "PATH".
How do I concatenate two environment variables in bash?
View 3 Replies View RelatedHow can I move around the bash commandline efficiently?In the Windows prompt, one can go back or forward one word by pressing ctrl and <-/->.What's the equivalent in a bash environment?
View 1 Replies View RelatedI am using Linux some years, but since I built a LFS, I feel noobish again. Now with the help of BLFS I am setting up my environment and somewhere I incidentally read, that not every variable is inherited by a child Bash shell. As for the $PS1 and $PS2 variables I know, that they are not inherited by non-interactive Bash shells (and there is no reason why they should in my opinion). Well, as for my first thread I hope the title gives enough information on what I want to know. But anyways: Which environment variables are not inherited by Bash shells?
View 1 Replies View RelatedScript programming question for the experts. I have written a bash script that works fine if I execute from the shell interactively. However, once I schedule it to be executed via cron, it just wouldn't work. I believe this has to do with cron running in a different environment than the one I am in when I putty in.
The bash shell script does refer to environment variables in the .cshrc file. I guess these aren't available to the cron? How can I load them into the script if I want them to be available to the cron locally within the script?
I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:
Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END
[code]...
below are the details of my system. I have bash as my current shell, some really common commands aren't working.
Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])
Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$
[Code]....
I would like to set up the shell env that i get after SSH to a remote host.
I am using a color screen in my terminal, having cusomtized LS_COLORS environment variable. Problem is, every time i log in to a remote host using SSH, i have to manually export LS_COLORS. You can say put that in ever .bashrc file in every host, but that is not very helpful because the remote host are lab servers that keep getting new OS very often(testing stuff), and the team and I usually log in there with root user.
Is there a way to do that?
I heard Enlightenment is one of the best looking desktop envioronments.
And KDE can be very amazing if you install a rendering engine on it.
I tried to install the nutchwax and hadoop as a prequisite for the wera.
Problem:
localhost:
Error: JAVA_HOME is not set.
source code:
What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.
View 3 Replies View RelatedI am running Red Hat Linux Enterprise 5; I am always using the export command to set environment variables.Are there any other ways to set environment variables and what are the advantages/disadvantages of them?
View 4 Replies View RelatedI'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.
Can I use two or more different profiles used in my console as the same time? Since, I always ssh to the other machines ,e.g. servers. in my console. Somehow, I always mix it up with my current PC.
I want to use 2 different profiles for different environments. Say, in server console, I use red background color. in my pc console, I use green background color such that i can easily distinguish out.or can i set the background color in .bashrc?
How can i start X without desktop environment?
My needs: Boot and load a notepad and when i close the notepad the PC turn off. Is it possible?
he $g09root is picked up ( in both the csh and the bash), but not the $GV_DIR or the $GAUSS_SCRDIR. I guess it's some stupid error, but it is highly frustrating.Here is the .profile file:Quote:
# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
#
[code]...
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 Relatedset the PATH environment variable?
View 4 Replies View RelatedI am working for a web hosting company. We work in red hat linux environment and the employees at present are having their data stored in individual systems. We wish to have a centralized environment, so that users can log in to a server with their user names irrespective of the systems they will set. Also, this could facilitate easy backup. we have about 70 systems, 90% linux machines. The number will grow in future. I am good in NIS, but not at all with LDAP. Is it okay if I suggest NIS?
View 2 Replies View RelatedI'm trying to setup a PXE boot environment.Now the diskless machine reads in vmlinuz and initrd.lz from the /tftpboot directory of the dhcp server machine (host name: antilop, runing slackware 11.0).There is a NFS export named /usr/data/ubuntu on antilop (which can be mounted from the client when runing mandriva mcnlive Toronto)When I'm trying to boot with PXE, the kernel and initrd starts, eth0 gets a valid ip address.Then a lot of error messages appear saying: NFS over TCP not available from 192.168.1.48 <- this is antilop, my DHCP server and NFS server too.
Here is the content of the /tftpboot directory:
-rw-r--r-- 1 root root 34 2010-02-11 20:49 boot.txt
-rwxr--r-- 1 tjp users 75564 2009-10-05 16:08 gpxelinux.0*
-r--r--r-- 1 root root 5755032 2009-10-28 00:00 initrd.lz
drwxr-xr-x 2 root root 2592 2010-02-12 12:59 pxelinux.cfg/
-r--r--r-- 1 root root 3890400 2009-10-16 00:00 vmlinuz
Here is the contents of my /pxelinux.cfg/default:
default aaaa
label aaaa
kernel vmlinuz
append boot=casper netboot=nfs nfsroot=192.168.1.48:/usr/data/ubuntu initrd=initrd.lz
There is no process listening on tcp port 2049 (on antilop)I asked my friend google but it didn't give a satisfying answer so far.Some said that no nfs-over-tcp exists on slackware, some said nfs clients trying over tcp must fallback to udp.
I am new user for linux. i need to know, how to work in scientific linux environment.
View 8 Replies View RelatedI need to do to make my VI scripts better formatted. The colorized commands, etc.., and the indents where necessary. Hope this question makes sense. I am running Fedora and Redhate Ent 5.
View 6 Replies View RelatedWhat's is the most efficient way to install multiple concurrent Java JDK versions on the same Linux machine?
I need Java5 whilst my current Ubuntu 9.10 Karmic comes loaded with Java6.
I know I could setup a VM for this but I am looking for alternatives.
I know many people have asked about environment variables before, but I am having a hard time dealing with these paths while ensuring I don't mess around with the original settings. How would you go about executing these commands in Ubuntu in terms of environment variables?
put /home/stanley/Downloads/ns-allinone-2.34/bin:/home/stanley/Downloads ns-allinone-2.34/tcl8.4.18/unix:/home/stanley/Downloads/ns-allinone-2.34/tk8.4.18/unixinto your PATH environment; so that you'll be able to run itm/tclsh wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put
/home/stanley/Downloads/ns-allinone-2.34/otcl-1.13,
/home/stanley/Downloads/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.
[Code]....
I'm currently installing Arch Linux on my old netbook. What desktop environment should I use? GNOME and KDE both seem way too big and unnecessarily fancy for what I want to do with my basic netbook. I just want internet, read pdfs, run emacs. no fancy stuff. What should I use? xfce? lxde? and why?
View 4 Replies View RelatedI am running an application which requires setting environment variables to be set.At the moment, the way I am achieving this is by exporting the EV at the command line, and then running the app from the command line.I want to be able to run the app from my menu (it is already a menu item after I installed it).How may I set the env var so that it is always available, so I can just run the app from the menu instead of from the CLI?
View 1 Replies View RelatedWith a desktop environment, there are file associations that goes with it. I'm a minimalistic user, who doesn't use any of such, but still want some kind of file associations to ease my burden. So I'm searching for a program that does something like the following. open file.pdf this will look at the extension, and translate to okular file.pdf. Of course one can always write a bash script to do this. I wonder if there is something existing, so I don't reinvent the wheel.
View 2 Replies View RelatedI 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
How can I use the ping command in a chroot environment?
$ ping 8.8.8.8
ping: icmp open socket: Operation not permitted
Currently I am using CentOs, but ideally there must be a solution that works in all chrooted environments.
Is it possible to load a new kernel while in a chrooted environment. Say I have one linux distro and want to chroot into another and load its kernel
View 1 Replies View Related