From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Bulatov Subject: heredoc and subshell Date: Wed, 24 Feb 2016 01:07:44 +0300 Message-ID: <2978711456265264@web9h.yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from forward11h.cmail.yandex.net ([87.250.230.153]:51272 "EHLO forward11h.cmail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755476AbcBWWQg (ORCPT ); Tue, 23 Feb 2016 17:16:36 -0500 Received: from web9h.yandex.ru (web9h.yandex.ru [84.201.186.38]) by forward11h.cmail.yandex.net (Yandex) with ESMTP id 6592C20DE0 for ; Wed, 24 Feb 2016 01:07:48 +0300 (MSK) Sender: dash-owner@vger.kernel.org List-Id: dash@vger.kernel.org To: dash@vger.kernel.org Hello, trying to minimize a shell code I found an unobvious moment with heredocs and subshells. Is it specified by POSIX how next code should be parsed? dash output for this code differs from bash and zsh. --- code prefix() { sed -e "s/^/$1:/"; } DASH_CODE() { :; } prefix A <