On Mon, Dec 27, 2010 at 04:56:53PM +0100, alexander.kra...@basf.com wrote:
>  > On Thu, Dec 23, 2010 at 10:17:03PM +0100, alexander.kra...@basf.com 
> wrote:
> > 
> > > -  sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
> > > +  sidadm="`echo $SID | tr '[:upper:]' '[:lower:]'`adm"
> > 
> > AFAIK, [:upper:] corresponds to (in English) A-Z, i.e. it
> > shouldn't be expanded by the shell. As opposed to [[:upper:]] or
> > [A-Z]. Are you sure that this needs fixing?
> 
> Yes, I'm sure:
> 
> a...@ncc1701d:~> echo "SMALL" | tr [:upper:] [:lower:]
> small
> a...@ncc1701d:~> touch u
> a...@ncc1701d:~> echo "SMALL" | tr [:upper:] [:lower:]
> tr: misaligned [:upper:] and/or [:lower:] construct
> a...@ncc1701d:~> echo "SMALL" | tr '[:upper:]' '[:lower:]'
> small

OK. It was unexpected to me that shell and tr differ in
expansion. It turns out that bash treats [:upper:] as a set.

Thanks,

Dejan

> > Thanks,
> > 
> > Dejan
> 
> Regards,
> Alex
> 
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to