bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make 'tr' (or something like it) a bash builtin ?


From: Chris F.A. Johnson
Subject: Re: make 'tr' (or something like it) a bash builtin ?
Date: Fri, 3 Feb 2006 00:14:39 -0500 (EST)

On Thu, 2 Feb 2006, Mike Frysinger wrote:

if i'm simply unaware of such bash features, please feel free to yell at me :)

when working on misc bash scripts, i semi-frequently find the need to do some
sort of string processing along the lines of say changing a string to all
upper case or lower case ... if 'tr' was a bash builtin, then that'd work
with some `echo | tr` magic, but it something like
${foo//[[:lower:]]/[[:upper:]]} would be nice

    There are a couple of extensions available which do case
    conversion. First (naturally) is mine, which is available at:
    <http://cfaj.freeshell.org/shell/bash/loadables/>. Second, is
    William Park's bash extension at:
    <http://home.eol.ca/~parkw/index.html#bash>.

--
   Chris F.A. Johnson                      <http://cfaj.freeshell.org>
   ===================================================================
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]