The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Description of Environments Supported By.... zizu UNIX for Dummies Questions & Answers 2 02-20-2005 06:52 AM
Unix environments for MS Windows Perderabo Answers to Frequently Asked Questions 0 02-06-2005 03:20 AM
Unix environments to fiddle around with eloquent99 UNIX for Dummies Questions & Answers 1 07-03-2003 10:53 PM
Declaring variable environments in .cshrc v_sharda UNIX for Dummies Questions & Answers 2 09-23-2002 10:25 PM
Crontab Environments SmartJuniorUnix UNIX for Dummies Questions & Answers 4 05-01-2001 02:14 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-12-2002
xNYx xNYx is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 26
setting environments

Hello,

How can I setup environments in a bash and tcsh?

I need to setup some paths and classpath.

thanks
xNYx
  #2 (permalink)  
Old 03-13-2002
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
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 (permalink)  
Old 03-17-2002
peter.herlihy peter.herlihy is offline
Registered User
  
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
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 (permalink)  
Old 03-24-2002
AtleRamsli AtleRamsli is offline
Registered User
  
 

Join Date: Feb 2002
Location: Brabant, Belgium
Posts: 65
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!

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..
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0