From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 13 Aug 2010 23:43:31 +0400 From: Alexey Tourbin To: devel@lists.altlinux.org Message-ID: <20100813194331.GA5417@imap.altlinux.org> References: <4C600551.5070308@altlinux.ru> <1281442559.24591.10@ildar.innovations.kz> <20100810122510.GZ10853@wrars-comp.wrarsdomain> <20100812214417.GC15707@wo.int.altlinux.org> <20100813124847.GA17095@mw.office.seiros.ru> <20100813154321.GA7685@imap.altlinux.org> <20100813183016.GA6764@atlas.home> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100813183016.GA6764@atlas.home> Subject: Re: [devel] bash4 X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2010 19:43:32 -0000 Archived-At: List-Archive: List-Post: On Fri, Aug 13, 2010 at 10:30:16PM +0400, Sergey Vlasov wrote: > Это не конфигурация, а документированная зависимость поведения bash от > имени, использованного при вызове, и отключение поддержки process > substitution в режиме совместимости с POSIX (документировано только в > info bash, в man в явном виде не описано): > > $ bash --posix -c 'diff <(echo a) <(echo b)' > bash: -c: line 0: syntax error near unexpected token `(' > bash: -c: line 0: `diff <(echo a) <(echo b)' > $ ln -s /bin/bash sh; ./sh -c 'diff <(echo a) <(echo b)' > ./sh: -c: line 0: syntax error near unexpected token `(' > ./sh: -c: line 0: `diff <(echo a) <(echo b)' > $ sh -c 'set +o posix > diff <(echo a) <(echo b)' > 1c1 > < a > --- > > b > > (в последнем случае нужно именно \n в строке, через разделитель ';' > не сработает - видимо, переключение опции posix происходит только при > разборе следующей строки). Hmm, this sheds some light onto why /bin/sh and /bin/bash are different. However, I feel the difference is rather unfortunate. Also, I wonder if there are other differences involved when changing essentialy the same shell from /bin/sh to /bin/bash and vice versa. If you play this stuff backwards, it says 'This sucks!'