Re: [newbie] /bin/sh: bad interpreter

2004-12-13 Thread Paul Smith
On Sun, 12 Dec 2004 20:42:47 -0700 (GMT-07:00), Simon Roberts
[EMAIL PROTECTED] wrote:
 Bad interpreter is the error bash gives when the script isn't executable.
 
 Do
 
   chmod +x LinxuxInstaller.bin
 
 and it'll probably be happy.
 
 (Anyone know why it does this strange thing?)

Simon,

It is strange, as if I go to the directory where LinxuxInstaller.bin is and I do

sh ./LinuxInstaller.bin

LinxuxInstaller.bin runs!

Paul


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] /bin/sh: bad interpreter

2004-12-13 Thread Simon Roberts
The syntax that works for you (sh xyz) says start a shell, and have that 
shell read this file, and follow the instructions in it. To do that, you must 
have read permission for the file. By contrast ./xyz says execute this file 
and for that, you must have execute permission :) These two really are handled 
differently, in the first case, you'll get by without the #!/bin/bash at the 
first line of the file, in the second case, the kernel loads the file, then 
examines it to determine _how_ to execute it (parsing, as it does so, the 
#!/blah, which tells it that it has a script and what interpreter to invoke).

What seems really odd to me is that every other shell I've ever used 
(including, I thought bash in the past/on other Unixen) say cannot execute if 
they find the file you name as $0 on a command line doesn't have execute 
permission for you. So, this error is really bizzare in my book. But whatever, 
once you know, you can handle it, right?

Cheers,
Simon


-Original Message-
From: Paul Smith [EMAIL PROTECTED]
Sent: Dec 13, 2004 4:55 AM
To: [EMAIL PROTECTED]
Subject: Re: [newbie] /bin/sh: bad interpreter

On Sun, 12 Dec 2004 20:42:47 -0700 (GMT-07:00), Simon Roberts
[EMAIL PROTECTED] wrote:
 Bad interpreter is the error bash gives when the script isn't executable.
 
 Do
 
   chmod +x LinxuxInstaller.bin
 
 and it'll probably be happy.
 
 (Anyone know why it does this strange thing?)

Simon,

It is strange, as if I go to the directory where LinxuxInstaller.bin is and I do

sh ./LinuxInstaller.bin

LinxuxInstaller.bin runs!

Paul




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



[newbie] /bin/sh: bad interpreter

2004-12-12 Thread Paul Smith
Dear All

I am trying to install a program using the following command inside a
the script installMapleLinuxSU:

sh ./LinuxInstaller.bin

but I get the error:

bash: ./installMapleLinuxSU: /bin/sh: bad interpreter: Permission denied.

Any ideas?

Thanks in advance,

Paul

PS: Since I am a GMail user, please be sure that you reply to the list.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] /bin/sh: bad interpreter

2004-12-12 Thread Todd Slater
On Sun, Dec 12, 2004 at 11:30:19AM +, Paul Smith wrote:
 Dear All
 
 I am trying to install a program using the following command inside a
 the script installMapleLinuxSU:
 
 sh ./LinuxInstaller.bin
 
 but I get the error:
 
 bash: ./installMapleLinuxSU: /bin/sh: bad interpreter: Permission denied.
 
 Any ideas?

Paul,

You don't need both sh and ./ so try either

sh LinuxInstaller.bin
or
./LinuxInstaller.bin
or even
/full/path/to/LinuxInstaller.bin

Todd


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] /bin/sh: bad interpreter

2004-12-12 Thread Mikkel L. Ellertson
Paul Smith wrote:
Dear All
I am trying to install a program using the following command inside a
the script installMapleLinuxSU:
sh ./LinuxInstaller.bin
but I get the error:
bash: ./installMapleLinuxSU: /bin/sh: bad interpreter: Permission denied.
Any ideas?
Thanks in advance,
Paul
PS: Since I am a GMail user, please be sure that you reply to the list.
Check if LinuxInstaller.bin is a script, and if it is, look at the first 
line.  It should be #!/something where something is the interpreter 
for running the script.  One problem that is still fairly common is that 
the full path will be provided, but it will be the wrong one for your 
system.  If it is /usr/local/bin, try changing it to /usr/bin and see if 
it works.  Or you can run witch command where command is the 
interpreter without the path.  This will return the path if the command 
can be found.

Mikkel
--
  Do not meddle in the affairs of dragons,
for you are crunchy and taste good with Ketchup!

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com



Re: [newbie] /bin/sh: bad interpreter

2004-12-12 Thread Simon Roberts
Bad interpreter is the error bash gives when the script isn't executable.

Do

  chmod +x LinxuxInstaller.bin

and it'll probably be happy.

(Anyone know why it does this strange thing?)

Cheers,
Simon


-Original Message-
From: Paul Smith [EMAIL PROTECTED]
Sent: Dec 12, 2004 9:52 AM
To: [EMAIL PROTECTED]
Subject: Re: [newbie] /bin/sh: bad interpreter

On Sun, 12 Dec 2004 10:28:31 -0600, Mikkel L. Ellertson
[EMAIL PROTECTED] wrote:
  I am trying to install a program using the following command inside a
  the script installMapleLinuxSU:
 
  sh ./LinuxInstaller.bin
 
  but I get the error:
 
  bash: ./installMapleLinuxSU: /bin/sh: bad interpreter: Permission denied.
  
 Check if LinuxInstaller.bin is a script, and if it is, look at the first
 line.  It should be #!/something where something is the interpreter
 for running the script.  One problem that is still fairly common is that
 the full path will be provided, but it will be the wrong one for your
 system.  If it is /usr/local/bin, try changing it to /usr/bin and see if
 it works.  Or you can run witch command where command is the
 interpreter without the path.  This will return the path if the command
 can be found.

Thanks, Mikkel and Todd. Meanwhile, by running LinuxInstaller.bin
directly, I was able to install the software I wanted to install.

Paul




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com