Since the program we need for senior design is only on a Linux machine, we are forced to use the most worthless operating system on the planet.Anyways, we need to execute four lines every time we log in so that we can run this program:% setenv SYS sun5% setenv SCM /afs/bp/dist/helios/scm% source $SCM/Command/scmrc% setenv LD_LIBRARY_PATH /afs/bp/dist/forte/SUNWspro/lib:$LD_LIBRARY_PATHSo I wrote a shell script:----#!/bin/cshsetenv SYS sun5setenv SCM /afs/bp/dist/helios/scmsource $SCM/Command/scmrcsetenv LD_LIBRARY_PATH /afs/bp/dist/forte/SUNWspro/lib:$LD_LIBRARY_PATHecho Complete.The output, as expected is "Complete," alas it did not work, because after entering these four lines the program is supposed to run. Note that when I enter the four lines manually (ie - not through a script), the program will run fine.'setenv' is supposed to set an environment variable that "does not vanish once the script is complete." Yet, when the script is complete, I checked to see what was assigned to SYS via:% $SYSAnd I get '$SYS: Command not found'Same story for the variable SCM. Why doesn't 'setenv' work properly? Anyone know why the environment variables vanish after the script is complete, even though they are by definition not supposed to?
2/7/2007 6:14:47 PM
Sometimes scripts are weird in that changes you make in the script only apply to the process that is running the script. When your process/script ends, those changes disappear.What you really need to do is modify your login scripts so that those variables are set for you automatically when you login. Assuming this is on an eos machine, simply rename your script to
.mycshrc
2/7/2007 7:09:08 PM
That did the trick. Thanks much!
2/7/2007 9:19:16 PM
2/7/2007 9:32:49 PM
Good catch
2/7/2007 9:35:11 PM
i don't understand. if the program you need is only on a linux machine, why are you forced to use windows?ZING!!
2/8/2007 1:04:46 AM
the fact that you're stupid doesn't reflect on the value of Linux one way or another.
2/8/2007 1:46:42 AM
2/8/2007 9:39:50 PM
2/8/2007 9:49:12 PM
2/8/2007 10:20:56 PM
Hate it? GOOD LUCK
2/8/2007 10:32:46 PM
2/9/2007 12:29:15 AM
I'm a windows advocate, my best friend is a linux guru. There's a lot of pro's and con's and without going into detail...Linux - more secure, free, "lighter", you can control what's running, what's installed, it's a very configure happy point of view. Windows - Everything you need is already there or easy to install. It's intuitive design "assuming" you need certain things. It's suitably configurable for most people. In truth Linux can do everything Windows can do except it takes a lot more time to accomplish things in most situations. But that also depends on what you use your computer for. If you use it for email, web browsing and gaming... linux is not for you. (even with the wine and other emulator programs). It's a time sink to make things work... It's a timesink. And while it's free, open source and highly configurable that's the double edge sword. It doesn't do anything you don't specifically tell it to do. It's not intuitive at all which is why it's not gone very mainstream. Attempts to make it this way are in Fedora Core, Unbuntu etc. So if you wanted to try one those two would be good. The big thing is people want point and click not command line. I am a developer. I work with webcode and databases all the time. I cannot stand linux because of it's incompatibility with most of the software I am comfortable using, and when something doesn't work it's never a simple fix. I think the best description someone ever gave me was that Linux was a manual shifter in a car while Windows is an automatic. Both have their pros and cons and it depends on what the driver wants.
2/9/2007 7:32:31 AM
i see it as analagous to Standard Ignition (linux) vs. Electronic Ignition (windows). when the Standard Ignition starts running rough, you tweak it. or replace some cheap (actually, free!) parts. when the Electronic Ignition fucks up, youve gotta spend lots of money replacing the whole goddamned thing. '... but no... that analogy also fails because Windows, unlike electronic ignitions, is neither more efficient, nor more robust.oh well, i tried
2/9/2007 1:15:57 PM