[LAD] [ot] capitalising words in a shell-script

Chris Cannam cannam at all-day-breakfast.com
Fri Sep 26 10:58:41 UTC 2008


On Fri, Sep 26, 2008 at 11:56 AM, Chris Cannam
<cannam at all-day-breakfast.com> wrote:
> $ echo hello | perl -pe 's/(.*)/\u$1\e/'

I was forgetting there's also a function for this, you don't have to
use the rather opaque substitution syntax:

$ echo hello | perl -e 'print ucfirst <>'


Chris



More information about the Linux-audio-dev mailing list