Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!elroy.jpl.nasa.gov!ncar!boulder!csn!news From: frechett@boulder.Colorado.EDU (-=Runaway Daemon=-) Newsgroups: comp.unix.questions Subject: Problem with #! Summary: Can't get #! to work on certain pathnames. Keywords: scripts expect Message-ID: <1990Dec23.083329.22021@csn.org> Date: 23 Dec 90 08:33:29 GMT Sender: news@csn.org Reply-To: frechett@snoopy.Colorado.EDU (-=Runaway Daemon=-) Organization: University of Colorado, Boulder Lines: 42 Nntp-Posting-Host: snoopy.colorado.edu 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. #! 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 " 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@snoopy.coloraod.edu -- -=Runaway Daemon=-