Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcnc!philabs!prls!mips!dce From: dce@mips.UUCP (David Elliott) Newsgroups: comp.unix.questions Subject: SysV sh <<- silliness Message-ID: <137@quacky.mips.UUCP> Date: Fri, 9-Jan-87 00:26:39 EST Article-I.D.: quacky.137 Posted: Fri Jan 9 00:26:39 1987 Date-Received: Sat, 10-Jan-87 08:38:20 EST Reply-To: dce@quacky.UUCP (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 27 For the 5th time in three years, I've had someone complain that their shell scripts break when using the System V shell because they use things like cat <<-END_OF_FILE- ... -END_OF_FILE- For those of you that don't know about <<- in System V shell, it means "strip off leading whitespace (or maybe just tabs) in the document and the terminator". This nice feature allows you to indent your text, but obviously it breaks working shell scripts (don't even talk to me about 'include' in make). Anyway, I just realized that the syntax <<# would have been a better idea. Since <<# is syntactically illegal in the BSD and System V shells already, 1. no valid shell script could be broken by adding this 2. if you tried to run a script that uses <<# with a shell that doesn't support it, it breaks with a syntax error instead of getting an unexpected end of file message. Does anyone see a flaw in this thinking? Is AT&T listening? Do they care? David