LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   little newbie script problem (https://www.linuxquestions.org/questions/linux-software-2/little-newbie-script-problem-136826/)

uncle_fungus1 01-20-2004 04:00 PM

little newbie script problem
 
Hi,
a program (Maple) I installed needs some variable to be exported, so therefore I wrote this little script, which I have called 'xmaple' and put it in /usr/bin/

Code:

#!/bin/sh
export LD_ASSUME_KERNEL=2.4.1
exec /home/me/installs/maple8/bin/xmaple $1

I associated the .mws extension to this xmaple with a program that came with the RH9 distro, and it works fine, except if I try to open a filename with spaces in it (then it tries to open 'a file.mws' as 'a.mws' and 'file.mws'). Can this easily be fixed by altering the script, or is there something else wrong?

It's not that big of a problem of course, but I'm curious how to solve it.

Thank you very much for helping,
mr fungus

stickman 01-20-2004 04:06 PM

Have you tried the following:
exec /home/me/installs/maple8/bin/xmaple "$*"

uncle_fungus1 01-20-2004 04:14 PM

just tried it, no luck :-/

Thanks anyway,
fung

spuzzzzzzz 01-20-2004 05:42 PM

If all you need is to export a variable, just add "export VARIABLE=whatever" to your ~/.bashrc script. Then type "source ~/.bashrc". The .bashrc script gets activated whenever you log in, so as long as you don't change users, VARIABLE should always be exported.

mikshaw 01-20-2004 05:48 PM

Ok...how about
exec /home/me/installs/maple8/bin/xmaple "$@"


All times are GMT -5. The time now is 09:25 PM.