[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ./init.sh: line 139: `test-acos': not a valid identifier
From: |
Eric Blake |
Subject: |
Re: ./init.sh: line 139: `test-acos': not a valid identifier |
Date: |
Thu, 18 Feb 2010 07:48:15 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
According to Eric Blake on 2/18/2010 6:39 AM:
> For that matter, we should also try 'set +o posix' prior to looking for a
> better shell; it is certainly faster, and works for bash:
>
> $ /bin/sh -c 'a-b() { echo hi; }; a-b'
> /bin/sh: `a-b': not a valid identifier
> $ /bin/sh -c 'set +o posix; a-b() { echo hi; }; a-b'
> hi
For that matter, with bash, we should use:
$ /bin/sh -c 'set +o posix; a-b() { echo hi; }; set -o posix; a-b'
hi
so that the rest of the script avoids any other bash extensions
incompatible with POSIX (does it strike you odd that bash lets you invoke
a function with an incompatible name, even though it won't let you define
it?).
--
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
signature.asc
Description: OpenPGP digital signature
- ./init.sh: line 139: `test-acos': not a valid identifier, Simon Josefsson, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Jim Meyering, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Jim Meyering, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Simon Josefsson, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Jim Meyering, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Simon Josefsson, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Eric Blake, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier,
Eric Blake <=
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Ralf Wildenhues, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Jim Meyering, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Ralf Wildenhues, 2010/02/18
- Re: ./init.sh: line 139: `test-acos': not a valid identifier, Eric Blake, 2010/02/18