Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set variable

Status
Not open for further replies.

230173

MIS
Jun 22, 2001
208
SG
Hi,

I'm triyng to implement a backup script i got with Backup & recovery book from Osborne.
These scripts use a variable that's called $TOOLS.
It needs to be set in the environment.

So i set it the /etc/environment file like this:
TOOLS=/path

The scripts still don't find the right files.

How can i test if a variable is set right?
I tried cd $TOOLS but nothing happend.
Help!!!
 
echo $TOOLS will show you what it is set to at any given time.

Do you really want $TOOLS to equal the explicit /path (or some other directory) or did you want it to be equivalent to the path in which case you should set TOOLS=$PATH ?

The environment is set when you log in, so if you have changed the file you need to log out and in again to invoke the new environment.

LHLTech

IBM Certified Specialist - AIX System Support
Halfway through CATE exams!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top