ubuntu script failure

Nils Kassube kassube at gmx.net
Sun Jan 1 14:44:45 UTC 2012


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,messages
> ,pm,ppp,scrollkeeper,wpa,wtmp}/$YEAR upon checking this made a
> directory called
> /var/log/system_archives//{acpid,auth,btmp,daemon,dpkg,kernel,message
> 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.


Nils




More information about the ubuntu-users mailing list