LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-20-2002, 02:26 AM   #1
IBP
LQ Newbie
 
Registered: Dec 2002
Posts: 7

Rep: Reputation: 0
Setenv


How do you do a setenv in redhat 8.0 ? - setenv doesn't appear to be a command which can be called in the same way as on unix.

Thanks
 
Old 12-20-2002, 04:11 AM   #2
aizkorri
Member
 
Registered: Feb 2002
Location: Basque Country
Distribution: Fedora 14, Ubuntu 11.10
Posts: 425
Blog Entries: 1

Rep: Reputation: 36
It depends on the shell you are using. If it is csh it works, but, for example, you have to use export in case you use bash.
type csh and the youŽll be able to use setenv.

Hope this helps.
 
Old 12-20-2002, 05:10 AM   #3
IBP
LQ Newbie
 
Registered: Dec 2002
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for that, what is the difference between bash and csh, and why are such useful things as setenv not implemented in bash?

Software I am trying to use has a script run from <cshrc> in the form 'alias source /home/x/bin/setupprog' (I am just trying to run it in bashrc) that sets global variables using setenv. Since setenv doesn't work in bash can I just put the line '#! /bin/csh' at the start of the script (which is then called as an alias) ?

Cheers
 
Old 12-20-2002, 09:05 AM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by IBP
Thanks for that, what is the difference between bash and csh, and why are such useful things as setenv not implemented in bash?
Bash and csh have two different syntax structures. Both have similar functionality, but do things slightly differently. For example:
in csh: setenv VAR value
in bash: export VAR=value
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setenv:too many argument petero Programming 1 06-02-2005 04:23 AM
help with command setenv J0sep Red Hat 3 06-22-2004 06:52 PM
setenv within a program doesn't last mvt Programming 8 04-26-2004 03:39 PM
setenv DISPLAY toxic53 Linux - Newbie 2 09-27-2001 01:47 AM
setenv ???? toxic53 Linux - Networking 1 09-26-2001 11:30 AM


All times are GMT -5. The time now is 12:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration