LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-20-2004, 04:00 PM   #1
uncle_fungus1
LQ Newbie
 
Registered: Oct 2003
Posts: 13

Rep: Reputation: 0
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
 
Old 01-20-2004, 04:06 PM   #2
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Have you tried the following:
exec /home/me/installs/maple8/bin/xmaple "$*"
 
Old 01-20-2004, 04:14 PM   #3
uncle_fungus1
LQ Newbie
 
Registered: Oct 2003
Posts: 13

Original Poster
Rep: Reputation: 0
just tried it, no luck :-/

Thanks anyway,
fung
 
Old 01-20-2004, 05:42 PM   #4
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
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.
 
Old 01-20-2004, 05:48 PM   #5
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Ok...how about
exec /home/me/installs/maple8/bin/xmaple "$@"
 
  


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
script not working need help , i'm newbie aneel_in Programming 5 06-14-2005 04:00 AM
Shell script newbie needs help! allididntwantto Programming 2 04-21-2005 05:53 AM
Newbie ---> use of script howto whschimmel Linux - Games 3 02-27-2005 01:18 AM
Help a newbie write a script! Braveheart1980 Linux - Software 14 09-22-2004 06:40 AM
Help a script newbie unholy Programming 2 09-19-2004 07:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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