help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] which file in bash source code (tarball) contain a print


From: Eric Blake
Subject: Re: [Help-bash] which file in bash source code (tarball) contain a print output function
Date: Wed, 21 Mar 2012 06:14:47 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

On 03/21/2012 06:01 AM, Chet Ramey wrote:
>> Eric Blake wrote:
>>> 'function' is a bashism; I would recommend sticking to the POSIX syntax of:
>>
>> Don't you mean ksh'ism?  :-)
>>
>> It is ksh syntax that bash has as a compatibility extension.
> 
> As the term is commonly used, it doesn't matter.  Any feature that bash has
> that isn't in dash is a `bashism' and to be avoided.

Not necessarily to be avoided, so much as a hint that you _must_ use
#!/bin/bash rather than #!/bin/sh to run the script (I welcome the full
power of bash, once I've conceded that I will always be running the
script under bash).  I merely point out bashisms as a service to help
readers of this list decide which shell they really meant to be using,
and to make them think about whether they intend to be portable to other
shells or if they are okay being locked into bash extensions.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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