Find the answer to your Linux question:
Results 1 to 4 of 4
Hi Everyone, I am working on an expect script to login into a server and copy few wars across the folders. But when i execute it I am getting the ...
  1. #1
    Just Joined!
    Join Date
    Dec 2010
    Posts
    5

    Expect script error: spawn not found

    Hi Everyone,

    I am working on an expect script to login into a server and copy few wars across the folders. But when i execute it I am getting the following error:

    [exec] loginServer.sh: spawn: not found.
    [exec] loginServer.sh: expect: 0403-006 Execute permission denied.
    [exec] send: -- unknown

    The first line is : #!/usr/bin/expect -f

    Is this anything to do with server setting or configuration that doesn't allow spawn??

    Please any help would be appreciated!!

    Thanks,
    Sandy

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    "copy a few wars"? Sorry, doesn't compute. Do you mean the postfix spawn command? It is not a system command, but a part of the postfix system, which is usually found as /usr/sbin/postfix.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Dec 2010
    Posts
    5
    Thanks for the reply Rubberman.

    Sorry I meant copy a war from one server to another using scp command which needs password entering.

    Anyways, One more silly doubt. If i place expect binary file to some other place say, /a/b/c/expect and give the same path in the first line of the expect script. Will it be needed for us to move the postfix file too..

    The issue is: in the server (AIX server) that i want to execute this script, there was no expect file. So i placed the file from my local to one of the bin folder and gave this path in the script. If i copy the postfix file to this location will this work.

    I am not that experienced with Unix/Linux environment. Please help me out here.

    Thanks,
    Sandy

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Sometimes this sort of problem is due to your PATH environment not being set properly, to include the directory where postfix et al are to be found.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...