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: 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: [ Attn: Randy ] Ad-hoc Parsing?
    ... I can write and compile ... >>programs inside a shell, ... But for me it is essential, that the script ... > internal command), the this script can be executed even if there ...
    (alt.lang.asm)
  • Re: Script to extract portions of text from a text file
    ... > But your example is not comparing the same command. ... it wouldn't be sent to the shell until you press enter). ... >> behaves differently in a script and at the prompt ... While awk does: ...
    (comp.unix.shell)
  • Re: Setting additional environment variables WITHIN an expect script
    ... command you are assuming that env ... If someone running a real shell ... >>a little proc that gets all the env info from the spanwed shell and then ... >>script is run before you even run expect and then it will inherit the values ...
    (comp.lang.tcl)