General :: Setting A Variable In Unix?
May 11, 2010
Whenever i want to start tomcat server I need to go totomcatdir>inand execute startup.sh file.How would i make this happen whenever i start my machine?Also want to know How would i set the variable at startup.
View 10 Replies
ADVERTISEMENT
Feb 1, 2011
How can I put a value of a php variable into a text file. I cant append or write the values into a text file.
View 2 Replies
View Related
Jan 30, 2010
What steps have to be followed for having customized contents of PATH environment variable whenever new users are created? I require this in order to include a special directory into PATH variable; and this has to be a default one for all the newly created users.
View 3 Replies
View Related
Feb 18, 2011
I installed java in my pc by running the following on the shell
./jdk-6u24-linux-i586.
I need to set the path to the bin directory and also a new environmental variable JAVA_HOME.
View 2 Replies
View Related
Jul 19, 2011
I'm trying to define a variable, CHAN, by dividing another variable, FREQ, by a number. FREQ is a value from a file (called header.txt). What I think I'm doing with this bit of code is reading a number from header.txt whose location is specified by the head and tails, assigning it to FREQ and then defining CHAN with bc.
Code:
#!/bin/bash
while read FREQ
[code]....
View 2 Replies
View Related
Jan 10, 2009
I have problems with setting my JAVA_HOME variable. I am using Slackware 12.0, bash shell. This is a question for the 'Linux Newbie' forum (not slackware-specific).
I have set JAVA_HOME in my /etc/profile, like this:
But when I login in with my user name and type env on the command line, I get for JAVA_HOME the following:
Also, in my /etc/profile I have put the path to my java in the PATH variable, like this:
And when I type env when I login, then the PATH variable contains correctly the path to the jdk (as I have put it into /etc/profile).
I expect that after I have set everything as I want in /etc/profile, and restart the computer then what I have set will be relevant and when I login and type env, I will get values to the variables equal to those I have set in /etc/profile. Why it does not happen?
I have particularly a problem with a Java application, which I want to run. When I type ant, I get:
error: JAVA_HOME is not defined correctly. We cannot execute /usr/lib/java/bin/java.
View 1 Replies
View Related
Jul 11, 2011
how can i set variable by following Quote: >> ./kuku -u a b c d -n ga go gi how can i set variable at tcshell... Quote: user = a b c d num = ga go gi
View 7 Replies
View Related
Jun 18, 2011
I am killing myself with this, please someone come to the rescue...
Code:
#!/bin/sh
IFILE=$@
[code]...
View 7 Replies
View Related
May 19, 2015
I have been trying to change my PATH environment variable to no avail. I am using Jessie i386 with MATE. Using my .bashrc file works but not well because with subshells the modifications get repeated. I want the change to occur on login.
I tried modifying ~/.profile ~/.bash_profile /etc/profile and /etc/environment and one or two others but in no case did my change get picked up even after logging out and in again and even after rebooting. I searched the Internet and found each of the above places to make the change but they don't seem to work with Jessie.
Where do I make the necessary change?
View 7 Replies
View Related
Jun 9, 2010
I am connected to work via a VPN. I am logging into a Solaris box at work from OpenSuse 11, using ssh -X. I would like to start a GUI on the solaris box. The problem is that I don't know what value to give the DISPLAY variable. Is it the local internal LAN ip address, for my machine? I did try that, and I tested it using, xterm on the solaris machine. It says it can't open the display. I have enabled remote connections on my machine using xhost +.I have to run a performance test on the Solaris box at 7am in the morning... so need to find out how to start the GUI
View 6 Replies
View Related
Feb 17, 2011
how to assign a local variable value to a global variable....
View 2 Replies
View Related
Jul 8, 2010
Since I got the liquorix kernel installed on my machine I got an error of setting kernel variable error. net.ipv6.bindv6only at boot time, since it wasnt a big deal I never looked further into it, but now that I had some spare time and I didnt want to see any errors on my machine I found a solution for it, with a little googling all we need to do is read the /usr/share/doc/procps/README.Debian and bingo no more error i hope this help anyone else with the same problem. I did the 3rd suggestion on that file to load the module in /etc/modules cheers.
View 4 Replies
View Related
Jul 28, 2010
I am a newbie to Linux. I tried setting environment variable using export JAVA_HOME=/usr/java/jdk1.6 but that was not permanent (i.e is was there for that terminal session). I want to know how can i set environment variable permanently in Fedora 13 just like we do in windows.After google search, some user suggested to edit bashrc and profile file for setting environment variables but above file contains some shell programs.
View 3 Replies
View Related
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
Jun 28, 2010
How to install oracle? I have been tried many times but seems can't resolve the DISPLAY issues.
All installer requirements met.
Use the following command to view the current DISPLAY environment variable setting:
View 2 Replies
View Related
Jul 25, 2010
can i use the value of one variable to generate a name for another variable? for example i want to use the counter from a "do while" loop to name and define a variable each time the loop executes. for example
objectnames1=`ls -a`
objectnames2=`ls -a`
etc.
i don't have a script yet but each time through the loop i intend to cd to a particular directory and then define a variable containing a list of each object in that directory as values. for the rest of the script to work, each variable generated has to be unique, and i can't think of a good way to accomplish this.
if using a value from one variable to name another isn't possible, can anyone think of a more elegant solution? i know limited syntax but i'm willing to read up...
View 6 Replies
View Related
Dec 27, 2010
I am trying to alter the character position of residue numbers above 999 in a pdb file.The following script is an attempt to:1) Get all unique pdb residue numbers (in column 5) using awk and assign it to a variable i.2) Loop through all the values in $i and if it is greater than 999, shift that number one character to the right using sed.However, the script only manages to alter the final residue numberCould anyone please advise how I can loop through all values in $i and shift it one character to the right?
#!/bin/bash
# Script to alter position of residue number in pdb file for resid above 999
i=$(awk '{print $5}' wt-test.pdb | uniq)
[code]...
View 6 Replies
View Related
May 14, 2010
Have installed Suse 11.2. how can I change the calendar format dd/mm/yyyy and how to configure the system to sync.from an ntp?
View 1 Replies
View Related
Feb 23, 2009
i have been using samba to gain access into windows computer through my pc which has fedora 8 ..can i access the unix machine from another unix machine? is yes then what is the procedures ?
View 4 Replies
View Related
Aug 21, 2009
I'm trying to read content of file to variable and use this variable in for loop. The problem is, when I have c++ comment style in file - /*. Spaces in line are also interpreted as separated lines.
For example:
Code:
Changing $files to "$files" eliminate these problems but causes that whole content of variable is treated as one string (one execution of loop).
View 6 Replies
View Related
Apr 7, 2010
my script has a variable which comes in the form +00.00 +0.00 -00.00 or -0.00 (the numbers can be any in that form) for any that have a + symbol I need to remove the +, but if it has a - symbol it needs to stay.
i need to make a new variable with the string from the old variable btut without any plus sign. I have tried a lot of different ways with no success, each thing I tried either left the + or removed the entire string. I think this should work but doesn't
foo=+12.40
bar=${foo#+}
View 4 Replies
View Related
May 4, 2010
I have a ubuntu server , can advise if I want to change the network setting ( eg. IP address , gateway address etc ) , which one is the configuration file ? for example , if I want to change eth0 setting , what file I should update ?
View 10 Replies
View Related
Jun 10, 2009
I have a text file i that has a mailTo: NAME in it. In a bash script i need to extract NAME and put it in a $variable to use. How do i do this?
View 2 Replies
View Related
Apr 25, 2011
how I can search within a variable and assign the results to a new variable. I'll use the following as an example -
cars="Audi BMW Cadillac Chevy Dodge Ferrari Ford Mercedes"
list=`echo ${cars} | egrep -o '<A?+|<C+'`
with the echo command I get the following output assigned to list -
A
C
C
What I'd like to get for output is -
Audi
Cadillac
Chevy
how I could do this regardless of upper/lower case letters?
View 5 Replies
View Related
Dec 8, 2009
On one of my servers I see this when I log in. What does this mean and how can I get it to go away? Everything seems to work fine, but none of my other machines give this error.
View 5 Replies
View Related
Aug 9, 2011
file 1 :
DB_NAME FIRST_ACTIVE_LOG DBPARTITIONNUM
-------- -------------------- --------------
BP1 279231 0
BP1 12735 1
BP1 12734 2
BP1 12735 3
BP1 12616 4
[Code]...
View 4 Replies
View Related
Apr 17, 2010
It's a dell ubuntu. But I don't know why I can't do:
myuser@192.168.0.103
which is my local-ip.
View 2 Replies
View Related
Jun 18, 2010
I tried to run % mvdir earlier and it said command not found. I then ran a search for it and still not found.Is there a place I can download the script for the command, and is there any information I should know post-download to get it to work?
View 4 Replies
View Related
Aug 21, 2010
I wonder if the unix commands (cp, mv, grep, args etc) are the same for Mac and Ubuntu. Do they have the same parameter lists and so on or do they try to stay the same but are slightly different?
View 3 Replies
View Related
Dec 18, 2010
What Linux or Unix version underlies Mac OS, OS X 10.6? Is there a good documentation for that version, specifically regarding security, networks and similar topics?
View 3 Replies
View Related