Problem with #!
-=Runaway Daemon=-
frechett at boulder.Colorado.EDU
Sun Dec 23 19:33:29 AEST 1990
I posted this question once and I have had no replies whatsoever.
Since our news server was just moved and has been really screwed up
lately, I decided to post again in case it never made it out the first
time.
------------------------------------------------------------------
This should be simple one way or the other.
I recently saw the FAQ list and pondered it until I saw a mention of
expect. Here was one I had never heard of. I promptly compiled
tcl and expect, and put them in a personal account. My problem is
that I am having problems with what I believe is the magic number. ie.
#!<expect_path> in expect scripts.
The first time that I compiled it all, it lived as /tmp/.../expect
and all the .exp scripts that I had could easily be executed directly as
long as the first line was
#!/tmp/.../expect -f
I then recompiled everything and it is now.
#!/users/en-eecs/huangc/.../expect -f
I am absolutely positive that this is the correct path for it but it simply
doesn't work now. It appears that it is trying to execute it as a csh
script as though it had ignored #! totally.
At this point, I can of course just use "expect -f <expect_script>" but this
creates problems when a given script tries to read specific arguments.
ie:
foobar.exp one two != expect -f foobar.exp one two
If the script tries to read args 1 and 2 then it will see "one" and "two"
in the first case and "-f" and "foobar.exp" in the second.
The inconsistancy drives me nuts.
I am on a DEC 5000 running Ultrix 4.0 Rev 179. I would like
some idea of why #! doesn't work now, and if possible I would like to
talk to some other people who are expect enthusiasts. I am a screen
enthusiast and I can see some interesting interactive possibilites
between expect and screen. Mail is welcome.
ian frechett at snoopy.coloraod.edu
--
-=Runaway Daemon=-
More information about the Comp.unix.questions
mailing list