LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-29-2004, 03:07 PM   #1
feetyouwell
Member
 
Registered: Dec 2003
Location: NC, US
Distribution: Novell Linux Eval (2.6.5)
Posts: 240

Rep: Reputation: 30
edit .bash_profile, trying to add variable, didn't work


I add the following line to my .bash_profile

SERVER=feetyouwell@<name of some server, containing dots>

export SERVER

so that i don't have to type the long string everytime i am sshing the server, after i edit the file, i did

sh .bash_profile

and then

echo $SERVER

nothing returns, WHY WHY WHY???
 
Old 08-29-2004, 03:19 PM   #2
Vookimedlo
Member
 
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 34
use ""

SERVER="feetyouwell@<name of some server, containing dots>"
export SERVER
 
Old 08-29-2004, 03:26 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
The problem is not with the speech-marks, it's
with the invocation. Source the script instead
of executing it in a sub-shell.

Not
sh .bash_profile
but
. .bash_profile
or
source .bash_profile
is what you want...

If you use "sh" the current bash fires up a new
sub-shell to which the SERVER variable will be
known, but after the script is executed it returns
and the settings made in the sub-shell are lost.


Cheers,
Tink
 
Old 08-29-2004, 03:56 PM   #4
feetyouwell
Member
 
Registered: Dec 2003
Location: NC, US
Distribution: Novell Linux Eval (2.6.5)
Posts: 240

Original Poster
Rep: Reputation: 30
thanks man, i think you solved my problem.
I got another question that no one has been able to answer,

When i save files (from internet or anywhere) to my desktop, it didn't show up at all
but when I open a terminal and cd to my desktop and do a list, the file is right there. Any idea why?
 
Old 08-29-2004, 04:14 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by feetyouwell
thanks man, i think you solved my problem.
I got another question that no one has been able to answer,
Pleasure ;)

Quote:
When i save files (from internet or anywhere) to my desktop, it didn't show up at all
but when I open a terminal and cd to my desktop and do a list, the file is right there. Any idea why?
You are using ... Gnome, KDE, ... ?


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
howto add an environment variable dtra Linux - Newbie 4 04-18-2005 06:22 PM
edit path environment variable to include current working directory alb1954 Linux - Newbie 8 07-11-2004 11:26 PM
.bash_profile alias doesn´t seem to work Electronkz Linux - Newbie 2 04-11-2004 03:17 AM
Installing MySQL, can't find .bash_profile to edit! blanderson Linux - Newbie 3 10-13-2003 01:52 PM
how do I edit the $PATH environment variable in RH7.3 needamiracle Linux - Software 3 07-02-2002 09:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration