[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-ha-dev
Subject: Re: [Linux-ha-dev] [PATCH] SAPInstance RA: 203 Fixed tr quoting
From: Dejan Muhamedagic <dejanmm () fastmail ! fm>
Date: 2010-12-28 10:43:13
Message-ID: 20101228104313.GA10295 () rondo ! homenet
[Download RAW message or body]
On Mon, Dec 27, 2010 at 04:56:53PM +0100, alexander.krauth@basf.com wrote:
> > On Thu, Dec 23, 2010 at 10:17:03PM +0100, alexander.krauth@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:
>
> alex@ncc1701d:~> echo "SMALL" | tr [:upper:] [:lower:]
> small
> alex@ncc1701d:~> touch u
> alex@ncc1701d:~> echo "SMALL" | tr [:upper:] [:lower:]
> tr: misaligned [:upper:] and/or [:lower:] construct
> alex@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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic