From owner-freebsd-questions Wed Jan 5 9:38:11 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (Postfix) with ESMTP id D1CFC14D9D for ; Wed, 5 Jan 2000 09:38:08 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.9.3/8.9.3) id SAA36801; Wed, 5 Jan 2000 18:38:07 +0100 (CET) (envelope-from olli) Date: Wed, 5 Jan 2000 18:38:07 +0100 (CET) Message-Id: <200001051738.SAA36801@dorifer.heim3.tu-clausthal.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG Subject: Re: Poss bug in /bin/sh? X-Newsgroups: list.freebsd-questions In-Reply-To: <84vu3o$1hpk$1@atlantis.rz.tu-clausthal.de> User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (FreeBSD/3.4-19991219-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Eric J. Schwertfeger wrote in list.freebsd-questions: > cat >> confdefs.h < #define PTY_BSD_SCHEME_FIRST_CHARS "`ls /dev/pty* | cut -c 9-9 | uniq | tr -d '\n'`" > EOF > [...] > running the same under bash produces the desired output. What's wrong > here? Yes, this is part of the configure script, if it looks strange, > though with my limited shell knowledge, I'd still expect it to work. From the sh(1) manpage: If the delimiter as specified on the initial line is quoted, then the here-doc-text is treated literally, otherwise the text is subjected to parameter expansion, command substitution, and arithmetic expansion (as described in the section on `Expansions''). So /bin/sh works perfectly correct. Bash probably doesn't. Regards Oliver -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) "In jedem Stück Kohle wartet ein Diamant auf seine Geburt" (Terry Pratchett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message