setting environments


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting setting environments
# 1  
Old 03-12-2002
setting environments

Hello,

How can I setup environments in a bash and tcsh?

I need to setup some paths and classpath.

thanks
xNYx
# 2  
Old 03-13-2002
For each user, bash can be customized by entering non-interactive commands in $HOME/.bash_profile
Also, system-wide customization can be done in /etc/profile

I'm not sure about csh, since I never use it.
# 3  
Old 03-17-2002
When setting your PATH make sure you add to the appropriate place in your path list....as the PATH list will be searched from start to finish to find the command you are after - so adding to your PATH may need to be at the end of at the beginning - depending if you want this directory to be searched first or last.

export PATH=/usr/bin/new_directory:$PATH (will add to start of path list)

export PATH=$PATH:/usr/bin/new_directory(will add to end of path list)

Very important if you have a command or fucntion that is stored within two places on your system - and you want to specify which one to use.
# 4  
Old 03-24-2002
There are two files that concern (t)csh:

/etc/csh.cshrc
and
/etc/csh.login

This is where you set up global stuff.

In each directoy, there are files like

.login

and one more ...?

OBS: Syntax for setting PATH is somewhat different:

setenv PATH "${PATH}:/moreppaths:/even/more/paths"

Also, syntax for loops and tests are different from BASH:

if ( test here ) then
....

foreach i ( spec here )
...
end
endif

More OBS: Do NOT let that put you off! Smilie

Atle

PS {
Good to know that people still enquire about csh.
It really is a good and simple shell for scripting.
}

Last edited by AtleRamsli; 03-24-2002 at 10:09 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Switch Desktop Environments via Terminal

Hi All, Does anyone know if it's possible to switch desktop environments via the terminal? I'm writing a script to install Cinnamon on Ubuntu and I would then like to remove unity but at the moment I have to ask the user to log out, log in with cinnamon and then continue the script to remove... (1 Reply)
Discussion started by: maerlyngb
1 Replies

2. AIX

Script to validate between two environments

Hi, I trust that you are well - I'm a bit new into AIX and I've been assigned a task to write a script that will always validate between our two Prod (Prod A and Prod B) environments to confirm which prod we live at. The two environments are exact replicas and this check I need to put in... (5 Replies)
Discussion started by: Twaggzk
5 Replies

3. Shell Programming and Scripting

Automating the task in two environments

Hi all, I have a task which need to be done in two test environment.both the script does the same work.i am plannig to automate that like writing a perl program to execute the script in parallel in both the test environment.i am able to call the unix script from the using in both the... (3 Replies)
Discussion started by: pals70423
3 Replies

4. UNIX for Dummies Questions & Answers

Question on Rehosting the Environments.

Hello All, We were planning to re host or change the environments (DEV,UAT & Prod) from one server to a different or new servers on a different host. So we have Informatica, Oracle software installed on our existing servers, since we upgraded the Informatica a couple of times there were many... (0 Replies)
Discussion started by: Ariean
0 Replies

5. UNIX for Dummies Questions & Answers

Description of Environments Supported By....

Im a learner on the unix/linux OS,i wanted a description of the main environments supported by the unix/linux environment. Thanks (2 Replies)
Discussion started by: zizu
2 Replies

6. Answers to Frequently Asked Questions

Unix environments for MS Windows

We often get questions about how to provide a Unix environment under Windows. Mircosoft has several OS's that collectively are called Windows. Most users are running a recent Microsoft OS with an NT kernel, usually Windows XP. The solutions in this thread may not work on very old Microsoft... (0 Replies)
Discussion started by: Perderabo
0 Replies

7. UNIX for Dummies Questions & Answers

Unix environments to fiddle around with

I'm a newbie and I was wondering if there were any public unix environments on the internet I could telnet to and fiddle around with?? (1 Reply)
Discussion started by: eloquent99
1 Replies

8. UNIX for Dummies Questions & Answers

Declaring variable environments in .cshrc

Hi All, I have been trying to set variable environment for the JAVA_HOME but it doesn' work. The path set is as follows setenv JAVA_HOME "/usr/local/jdk1.3" setenv PATH $JAVA_HOME/bin setenv CLASSPATH ${JAVA_HOME}/lib/tools.jar:{JAVA_HOME}/lib/dt.jar can anyone suggest Me where am I and... (2 Replies)
Discussion started by: v_sharda
2 Replies

9. UNIX for Dummies Questions & Answers

Crontab Environments

I have a user trying to execute a command,in crontab, which requires certain envrionmental variables to be set. He is using tcsh on a Solaris 7 system. I have created a hack by doing the following in the crontab entry... 0 0-23 * * * rsh localhost -l user /path/command This doesn't seem... (4 Replies)
Discussion started by: SmartJuniorUnix
4 Replies
Login or Register to Ask a Question