bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about inline code / incompatibility between FreeBSD sh and


From: Andreas Schwab
Subject: Re: Question about inline code / incompatibility between FreeBSD sh and bash
Date: Sat, 21 Jun 2008 19:56:05 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)

"Garrett Cooper" <yanegomi@gmail.com> writes:

> Hi,
>      Sorry for emailing this list, but neither the GNU indexed
> homepage nor the actual project page listed any other email address.
>      I'm trying to determine whether or not this is an implicit bug or
> a feature of BSD bourne shell (in particular FreeBSD's sh):
>      When I try and execute `portsnap fetch update' [1], things go
> through as the author intended. However, using `bash portsnap fetch
> update' I get the following error message:
>
> /usr/sbin/portsnap: portsnap: line 882: syntax error near unexpected
> token `newline'
> /usr/sbin/portsnap: portsnap: line 882: `       if !'
>
>      The incompatible section of code (at least the one that bash
> barfs on -- I say that because there are a few similar sections IIRC)
> is:
>
>         if !

POSIX does not allow a newline between ! and the command, see
<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_10_02>.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]