bug-bash
[Top][All Lists]
Advanced

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

Re: Syntax for tab character


From: Chet Ramey
Subject: Re: Syntax for tab character
Date: Fri, 24 Apr 2009 18:54:29 -0400
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

Bill Gradwohl wrote:
> On Fri, 2009-04-24 at 13:50 -0400, Greg Wooledge wrote:
>> parameter=${paramter//[ $'\t']/}
> 
> I experimented a bit. See the attachment.
> 
> 
> The first 3 dumpit outputs are expected. The next 2 are not. The last 2
> show what I would have expected from the previous 2.

I'm not quite sure what this is supposed to demonstrate.  In the cases
where you have specified the tab character correctly ($'\t'), it's
converted into a tab before matching is attempted.  You can tell this
because in the cases where you have not, either the literal `$' gets
removed, or the literal instances of \t in the value of parameter are
removed.  Since there are no tab characters in $parameter, no tabs get
removed when you specify $'\t' correctly.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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