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

Re: [Xen-devel] [PATCH 1 of 4] fix state



Zhigang Wang writes ("[Xen-devel] [PATCH 1 of 4] fix state"):
> -    else if [[ "$1" =~ '(name' ]]; then
> +    else if [[ "$1" =~ $name_re ]]; then

This is really shockingly ugly.  What would be wrong with using case ?

Since this is a bash-specific script already, we can use
${..#...} ${..##...} ${..%...} ${..%%...} too.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.