I am trying to run my Expect script from two different locations and it will work with the following Expect executables referenced:
- My linux home directory (
#!/usr/bin/expect
) - A clearcase view on another server (
#!/clearlib/vobs/otherdir/bin/expect
)
The problem is that I cannot run the script in both places unless I change the reference of the Expect executable location to the first line of the file.
How can I get the correct instance of the Expect executable for the corresponding directory?