Updating Profile from script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Updating Profile from script
# 1  
Old 02-03-2005
Updating Profile from script

I am trying to figure a way to update an environmental variable in my .profile from script.

I have a variable name CON_DIR in my .profile.

I want to be able to update this variable directly via another unix script.

Any ideas?

Thanks.
# 2  
Old 02-03-2005
What shell?
# 3  
Old 02-04-2005
thanks

Korn shell
# 4  
Old 02-04-2005
In your script
export CON_DIR=<variable value>
# 5  
Old 02-04-2005
I think that he wants to cause a permanent change to .profile so it will affect the next login. If this is true, in .profile I would do...
export CON_DIR=$(<condir.txt)
then put "/a/b/c" or whatever in condir.txt

Later, any script can put a different path in condir.txt to change the next login. The script can also change its envirornment as encrypted mentioned, but when the script exits, the parent shell will still have the old environment. So the parent might also need to change CON_DIR.
# 6  
Old 02-04-2005
reply

I figured out a workaround. Not very elegant but does the trick.
Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Need script for updating spreadsheet in sharepoint

Hi All, Can any one please help me in writing a script or similiar to that to update excelsheet in sharepoint. Basically what I am trying to do here is to copy the coloumns from the output of a shell script and paste that in excel sheet which is in sharepoint. Please help me. Thanks (1 Reply)
Discussion started by: thankful123
1 Replies

2. Shell Programming and Scripting

updating a single line by script

hi, I'm trying to add a # to the beginning of the line where the a word is included. and the i want to run the whole original script. and if possible I would prefer that line would stay in the same order in the text file, the line which includes the word. Thanks, (10 Replies)
Discussion started by: ozum
10 Replies

3. Shell Programming and Scripting

Script for updating a .csv file

Hello guys, I have one .csv file with all the file names(.c,.h,.sm,.txt etc)..... Now i have compared two baseline in UCM and got a report in .txt file,which looks like this...... DIFFBL INT_1029_Rel6.0.0.90@\DIR_PVOB STD_6.0.0.50_UCM@\DIR_PVOB (COMPONENT TEXT) Comparing the following: ... (14 Replies)
Discussion started by: suvenduperl
14 Replies

4. Shell Programming and Scripting

awk updating one file with another, comparing, updating

Hello, I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^ Here is what I'm trying to achieve : file1: test filea 3495; test fileb 4578; test filec 7689; test filey 9978; test filez 12300; file2: test filea... (11 Replies)
Discussion started by: mecano
11 Replies

5. Shell Programming and Scripting

script for updating table using file(

Hi, Data file path (.txt) Control file(.ctl) I have delimited file(|). Sample data: 1|name|50009|DS24|0|12 2|name|30009|DS24|0|13 3|name|20409|DS24|0|14 4|name|20009|DS24|0|15 5|name|10009|DS24|0|16 I want to load this data into a oracle table (update and insert) Please help me... (1 Reply)
Discussion started by: unihp1
1 Replies

6. UNIX for Advanced & Expert Users

Problem in updating .profile file in HP-UX B.11.00 machine

Hello All, I am using a HP-UX machine and I want to update the .profile file so that after login to my userID that will be applicable to my ID also. What I am trying to do is : In .profile file I am trying to write in /home/userID folder: export PATH=$PATH:$HOME:. so that whenever I will... (3 Replies)
Discussion started by: abhishek0071
3 Replies

7. Post Here to Contact Site Administrators and Moderators

Error updating profile

I'm trying to update my profile with a temp e-mail address. This is a hotmail e-mail address and it wont allow it. The reason for this is I've changed my service with my ISP since I've moved :D and well I've gone form Cable to DSL :mad: Now my e-mail accounts are still there but I can't... (4 Replies)
Discussion started by: woofie
4 Replies
Login or Register to Ask a Question