Re: Executing scripts on the remote machine



On Apr 22, 7:50 pm, s...@xxxxxxxxxxxxxxxxx (Douglas Wells) wrote:
In article <1177249488.426716.138...@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Nico <nka...@xxxxxxxxx> writes:
On 22 Apr, 13:15, markoa <marko.anasta...@xxxxxxxxx> wrote:
On Apr 22, 4:02 am, Unruh <unruh-s...@xxxxxxxxxxxxxx> wrote:

markoa <marko.anasta...@xxxxxxxxx> writes:
I'm trying to run a configure script located on a remote server.
I login, cd, and try to run './configure', but get:
./configure: not found

ls -la ./configure
What does that command return?

-rwxr-xr-x 1 admin wheel 60813 Apr 21 15:41 ./configure

Being new to this, I don't know what else to try. (The file is
executable,
specifying a complete path does not help; it's a POSIX shell on
FreeBSD

through ssh.

It should work. Can you test another shell script? Or is the partition
mounted in some odd fashion?

There are a few more things to try.

Running a shell script means that two programs have to exist, both
the script itself and the shell interpreter. Problems with either
will cause problems, possibly resulting your error message: not found.

I've seen numerous scripts with "all the world is Linux" syndrome.
Have a look at the look at the first line of your configure
script. It should say "#!/bin/sh" or something very similar.
Common errors are for it to say "#!/usr/bin/sh" or "#!/bin/bash"
or "#!/usr/bin/bash". All of these are likely to cause problems
on at least some systems, possibly including yours.

Just as an experiment, try the following:
/bin/sh ./configure

- dmw

It is "#!/bin/sh". /bin/sh ./configure works. Thank you all!

Marko

.



Relevant Pages

  • Re: Newbie getting desperate with for
    ... This tells the shell to run the script ... When you run a command from the shell, it first tries to directly execv ... which calls the kernel to load and execute the file. ...
    (comp.lang.python)
  • Re: shell scripting
    ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
    (comp.unix.questions)
  • Re: shell scripting
    ... and am assuming an sh-compatible shell here.... ... command 1 options arguments ... To run the script, do: ... then you need to use the full path to execute it: ...
    (comp.unix.shell)
  • Re: [opensuse] Lazarus and free pascal need ELF
    ... In a bourne shell interpreter, which is what you are in while you are logged in and sitting at a command prompt, the syntax "dot space filename" does not execute the file, it sources the file. ... It has the effect that your current shell instance ends up directly executing the commands, which may look and smell like the normal way a script or program is executed, but it's in fact quite different. ... The simplest example of why this is "wrong" even though it seems to "work for scripts" would be to look at any typical script that has an exit command. ...
    (SuSE)
  • Re: [opensuse] Lazarus and free pascal need ELF
    ... Lazarus the following in command line.. ... In a bourne shell interpreter, which is what you are in while you are ... Sourcing a file is usually meant for a script to read in some variables ... exit command. ...
    (SuSE)