On 2011-03-28 09:10:07 Michael P. Soulier wrote:
>Is this syntax not supported by posix?
>
>cat /etc/aliases.{1,2} > /etc/aliases
No, brace expansion is not required by any (published[1]) edition of POSIX or
the Single UNIX Specification.
For this case though, you can generally use (cat /etc/aliases.[12] >
/etc/aliases).
[1] I'm not sure about the work-in-progress SUSv4 or a work-in-progress POSIX,
if one exists.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
03-28-2011, 04:04 PM
Thilo Six
broken shell script with dash
Michael P. Soulier wrote the following on 28.03.2011 16:10
> cat /etc/aliases.{1,2} > /etc/aliases
$ ./checkbashisms fooo.sh
possible bashism in fooo.sh line 2 (brace expansion):
cat /etc/aliases.{1,2} > /etc/aliases
checkbashisms is in devscripts but i would not advocate to install the hole
beast. Just download the .deb and extract it.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: imqbi1$mah$1@dough.gmane.org">http://lists.debian.org/imqbi1$mah$1@dough.gmane.org
03-28-2011, 05:05 PM
Andrew McGlashan
broken shell script with dash
Hi,
Thilo Six wrote:
Michael P. Soulier wrote the following on 28.03.2011 16:10
cat /etc/aliases.{1,2} > /etc/aliases
$ ./checkbashisms fooo.sh
possible bashism in fooo.sh line 2 (brace expansion):
cat /etc/aliases.{1,2} > /etc/aliases
checkbashisms is in devscripts but i would not advocate to install the hole
beast. Just download the .deb and extract it.
Why, we are not running on zx80, trs-80, apple ][, vic20 or anything
like that these days; disk is cheap and a few extra MBs isn't going to
hurt anything today.
The WHOLE package is worth how many bytes? The installed size for the
squeeze version is under 2MB, unless you need the ia64 version which is
closer to 4MB [1]. What's the big deal? I don't think it's worth the
effort of extracting it from the .deb file. Heck, I'm not even so sure
this email is worth the effort ;-)
[1] http://packages.debian.org/squeeze/devscripts
--
Kind Regards
AndrewM
Andrew McGlashan
Broadband Solutions now including VoIP
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Andrew McGlashan wrote the following on 28.03.2011 19:05
> Hi,
>
> Thilo Six wrote:
>> Michael P. Soulier wrote the following on 28.03.2011 16:10
>>
>>> cat /etc/aliases.{1,2} > /etc/aliases
>>
>> $ ./checkbashisms fooo.sh
>> possible bashism in fooo.sh line 2 (brace expansion):
>> cat /etc/aliases.{1,2} > /etc/aliases
>>
>> checkbashisms is in devscripts but i would not advocate to install the hole
>> beast. Just download the .deb and extract it.
>
> Why, we are not running on zx80, trs-80, apple ][, vic20 or anything
> like that these days; disk is cheap and a few extra MBs isn't going to
> hurt anything today.
>
> The WHOLE package is worth how many bytes? The installed size for the
> squeeze version is under 2MB, unless you need the ia64 version which is
> closer to 4MB [1]. What's the big deal? I don't think it's worth the
> effort of extracting it from the .deb file. Heck, I'm not even so sure
> this email is worth the effort ;-)
>
> [1] http://packages.debian.org/squeeze/devscripts
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: imqkpf$j06$1@dough.gmane.org">http://lists.debian.org/imqkpf$j06$1@dough.gmane.org
03-28-2011, 07:48 PM
Ron Johnson
broken shell script with dash
On 03/28/2011 01:41 PM, Thilo Six wrote:
Andrew McGlashan wrote the following on 28.03.2011 19:05
[snip]
Why, we are not running on zx80, trs-80, apple ][, vic20 or anything
like that these days; disk is cheap and a few extra MBs isn't going to
hurt anything today.
The WHOLE package is worth how many bytes? The installed size for the
squeeze version is under 2MB, unless you need the ia64 version which is
closer to 4MB [1]. What's the big deal? I don't think it's worth the
effort of extracting it from the .deb file. Heck, I'm not even so sure
this email is worth the effort ;-)
[1] http://packages.debian.org/squeeze/devscripts
# aptitude install devscripts
The following NEW packages will be installed:
autopoint{a} [0.18.1.1-3] (for devscripts)
[snip]
libyaml-syck-perl{a} [1.12-1] (for devscripts)
lintian{a} [2.4.3] (for devscripts) make{a} [3.81-8] (for devscripts)
po-debconf{a} [1.0.16+nmu1] (for devscripts)
strace{a} [4.5.20-2] (for devscripts)
0 packages upgraded, 48 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/51,6 MB of archives. After unpacking 94,4 MB will be used.
Do you want to continue? [Y/n/?]
Since that's 8/10 of 1% of 1% of a 640GB drive, I'm not impressed with
your argument.
--
"Neither the wisest constitution nor the wisest laws will secure
the liberty and happiness of a people whose manners are universally
corrupt."
Samuel Adams, essay in The Public Advertiser, 1749
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: imsts6$s9a$1@dough.gmane.org">http://lists.debian.org/imsts6$s9a$1@dough.gmane.org
04-06-2011, 12:33 PM
"Michael P. Soulier"
broken shell script with dash
On 28/03/11 Miles Fidelman said:
> of course you could just run your script under bash
And I am, but why is dash claiming to be a posix shell by being /bin/sh?
Mike
04-06-2011, 12:34 PM
"Michael P. Soulier"
broken shell script with dash
On 28/03/11 Boyd Stephen Smith Jr. said:
> No, brace expansion is not required by any (published[1]) edition of POSIX or
> the Single UNIX Specification.
>
> For this case though, you can generally use (cat /etc/aliases.[12] >
> /etc/aliases).
>
> [1] I'm not sure about the work-in-progress SUSv4 or a work-in-progress POSIX,
> if one exists.
Hmm, ok. I'll work around it. I prefer my scripts to be portable to all unixes
if possible.
Mike
--
Michael P. Soulier <msoulier@digitaltorque.ca>
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein