bug-bash
[Top][All Lists]
Advanced

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

Re: last argument expansion has different output using the sh interprete


From: Greg Wooledge
Subject: Re: last argument expansion has different output using the sh interpreter
Date: Fri, 27 May 2011 16:53:58 -0400
User-agent: Mutt/1.4.2.3i

On Fri, May 27, 2011 at 01:35:50PM -0700, Jacoby Hickerson wrote:
> Although, I am curious, is this is a matter of sh
> being continually updated to exclude all bash extensions

Eh?  POSIX is defined by a group of people and published.  Here's the
current edition:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html

"... continually updated to exclude bash extensions..." doesn't even make
sense to me.  It doesn't generally get *smaller* with each edition;
rather, it gets larger.

> or perhaps
> previously bash didn't interpret #!/bin/sh to be the POSIX compliant
> interpreter?

Are you talking specifically about the behavior of bash when it is invoked
as "sh"?  If I were you, I wouldn't even waste brain cycles on that.
When you write a script, decide whether you are writing a bash script,
or an sh script.  If you are writing a bash script, pick which version of
bash you are writing it for, and then use the features available in that
version and older, and use the #!/usr/bin/env bash or #!/bin/bash shebang.
If you are writing for sh, then use only POSIX features, and use the
#!/bin/sh shebang.



reply via email to

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