I'm trying to override the environmental variable in my script, however when I execute the script, the PATH whatever being set in .profile is taking precedence.
I have done the sanity checks like order of my entry in path, permissions for the user etc.,
To be precise, I have two versions of Java in my server , my .profile refers to java1.4, however for a specific application which is trigerred from bash shell script,I want to use Java1.6.
I'm epecting this script to calll the java instance set in JAVA_HOME, however it still calls the /usr/bin/java (being set in .profile).
However if I change the values of environmental variables provided above in .profile, then I'm able to call the appropriate java version.
I don't wanna apply this change for the entire user but for just the session.
Can I not override environmental variables for a session alone ?
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
I am executing a shell script which contains a jar call to an external java package for which I don’t have a read access to. The external package was written in such a way that whenever we make a java –jar call to the package, it shows a prompt on the console asking if we want to continue or no... (1 Reply)
Hello All,
I am working on a project where the requirement is override mailx command in such way that, instead of sending mailing to email addresses coded in codes, it should send mails to one common email address at run time.
We do not intend to change the email addresses in codes.
This... (1 Reply)
Hi All,
I have an XML file (normally >3mb). I need to loop through this and override with some new (correct) values.
Here is a row of data:-
<row>
<field name="ID">1</field>
<field name="Type">a</field>
<field name="value1">xxx</field>
<field name="value2">xxxx</field>
....... (3 Replies)
Hello,
I have a script that uploads a file from local to remote place using ftp. The problem is that, if on remote host there is a file called the same as the one I want to upload, the ftp program overrides that file. But I don't want to override nothing (even if the remote file is older,... (3 Replies)
class B
{
public:
void fns(void){//base def;}
};
class D:public B
{
public:
void fns(void) {//new def;}
};
I was thinking the above is overriding but somewhere else i found the above is just hiding.Only virtual functions can be considered as overriding?
This is the exact statement ... (1 Reply)
hello everbody:
Im trying to give the user "ydarwish" a full access over some directory on my sol9 machine.
however the setfacl is recalculating the mask parameter keeping me from keeping him effective write and read access:
root@Obi-Wan> setfacl -m u:ydarwish:rwx /IN_ARCHIVE6
root@Obi-Wan>... (4 Replies)
Hi,
I wonder how can we override the dynamic library loaded by ld on start up.(dynamic linked application). so that linker uses the new library to find symbols.
Is it possible to do.
Cheers. (4 Replies)
Hi,
I have come across a fact that /etc/resolv.conf can be overrided by using ~/.nslookuprc.
Is this completely true...i.e can I completely override /etc/resolv.conf.
If so, can I have a list of my own domainnames & Nameservers in ~/.nslookuprc that can override those in resolv.conf.
... (3 Replies)
i want to replace the *alloc and free function calls in an existing project with my own functions, to be able to log the adresses etc in a text file. (memoryleak debugging)
I think LD_PRELOAD is what i am looking for.
That way i could create a Library with my own malloc functions and link them... (1 Reply)