ubuntu script failure

Nils Kassube kassube at gmx.net
Mon Jan 2 10:19:26 UTC 2012


Edward avanti wrote:
> On Mon, Jan 2, 2012 at 7:18 PM, Edward avanti 
<edward.avanti at gmail.com>wrote:
> > On Mon, Jan 2, 2012 at 12:44 AM, Nils Kassube <kassube at gmx.net> 
wrote:
> >> Edward avanti wrote:
> >> > Halo,
> >> > Does anyone else find if they call the multi option from ubuntu
> >> > sh script it fails?
> >> > 
> >> > For instance
> >> > 
> >> > mkdir -p
> >> > /var/log/system_archives/{acpid,auth,btmp,daemon,dpkg,kernel,mes
> >> > sages ,pm,ppp,scrollkeeper,wpa,wtmp}/$YEAR upon checking this
> >> > made a directory called
> >> > /var/log/system_archives//{acpid,auth,btmp,daemon,dpkg,kernel,me
> >> > ssage s,pm,ppp,scrollkeeper,wpa,wtmp}/2012
> >> > 
> >> > if I run this from my shell manually, it works
> >> > 
> >> > this same script I use on all my servers, centos, gentoo,
> >> > slackware, on those it works as intended,. but on ubuntu  it
> >> > goes stupid not honouring the {}
> >> 
> >> Probably you start your script with "#!/bin/sh" which is a link to
> >> dash in Ubuntu and to bash on other systems. As dash doesn't know
> >> your wanted feature, you should start your script with
> >> "#!/bin/bash" instead.
> 
> Christ all fucking mighty!
> why cant these dickhead tossers leave things alone, they have to be
> fucking usellessly different
> ...
> Thanks for the info
> had enough of the fuckbuntu quirks, they are worse than microsoft,
> this and the other screwups these lamers have done is enough,
> opensuse is going on that boxen shortly

Wrong approach IMHO. After all, with "#!/bin/sh" you tell the system 
that the script is simple enough that any shell could run it and 
therefore you don't care which one is used. But then you use features 
which are not known to every shell. Therefore it would be wise to fix 
the bug in your script anyway. Opensuse may work now but are you sure 
they won't change the default shell in the future?


Nils




More information about the ubuntu-users mailing list