Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!ulysses!andys From: andys@ulysses.homer.nj.att.com (Andy Sherman) Newsgroups: comp.bugs.4bsd Subject: Here Documents not closed in at Message-ID: <11703@ulysses.homer.nj.att.com> Date: 26 Jun 89 17:24:27 GMT Sender: netnews@ulysses.homer.nj.att.com Reply-To: andys@ulysses.homer.nj.att.com (Andy Sherman) Organization: AT&T Bell Laboratories - Murray Hill, NJ Lines: 28 The 4.2 and 4.3 BSD versions of at will fail if you use a shell that strictly follows the POSIX standard for handling here documents. Note that previous documentation of the shell indicated that a here document could be closed by either the key line or by an end of file. According to POSIX, an end of file while processing a here document is a syntax error. The shell script generated by the stock 4.3 version of at contains the construct: $SHELL << '...the rest of the file is shell input' ... Your commands submitted to at ... END OF FILE With a POSIX conforming shell, all your at jobs will terminate with syntax errors rather than executed jobs. The fix to at.c is easy. Output the line: ...the rest of the file is shell input just before closing the at queue file. -- Andy Sherman/AT&T Bell Laboratories/Murray Hill, NJ *NEW ADDRESS* AUDIBLE: (201) 582-5928 *NEW PHONE* READABLE: andys@ulysses.ATT.COM or att!ulysses!andys *NEW EMAIL* The views and opinions are my own. Who else would want them? *OLD DISCLAIMER*