[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: bash script

Indraneel Majumdar forced the electrons to say:
> > echo $word | perl -pe 's/(.*)/\L$1/g'
> shouldn't that use
> tr/A-Z/a-z/g;
> instead of
> s/(.*)/L$1/g

Well, I guess different choices for different people.

Note that my initial suggestion had \L, which in perlese means "convert
to lower case". Seems the use here is precisely the kind of thing it was
designed for. Maybe I should rewrite the whole thing in perl? :-)