[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in tr?
From: |
Bob Proulx |
Subject: |
Re: bug in tr? |
Date: |
Thu, 2 Nov 2006 21:56:59 -0700 |
User-agent: |
Mutt/1.5.9i |
address@hidden wrote:
> I working on script to alfabetical catalogue my files and...
> try this:
>
> mkdir for_test; cd for_test
> mkdir q w e r t y u i o p a s d f g h j k l z x c v b n m
> echo WoRd | tr [:upper:] [:lower:]
>
> any sloution?
Quote your arguments to TR so that they are not expanded by the
command shell. You can see what they are expanding to by using the
echo command.
echo tr [:upper:] [:lower:]
tr e p r u e l o r w
Is that what you expect? Probably not.
Try quoting the shell file glob characters like this:
echo tr "[:upper:]" "[:lower:]"
tr [:upper:] [:lower:]
echo WoRd | tr "[:upper:]" "[:lower:]"
word
Bob