bug-bash
[Top][All Lists]
Advanced

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

Re: Syntax for tab character


From: Greg Wooledge
Subject: Re: Syntax for tab character
Date: Fri, 24 Apr 2009 13:50:56 -0400
User-agent: Mutt/1.4.2.2i

On Fri, Apr 24, 2009 at 11:32:09AM -0600, Bill Gradwohl wrote:
> What I want to do is remove all the space and tab characters.

parameter=${parameter//[[:space:]]/}

or

parameter=${paramter//[ $'\t']/}

>From an older bash(1) manual:

       Words of the form $'string' are treated specially.  The word expands to
       string, with backslash-escaped characters replaced as specifed  by  the
       ANSI  C  standard.

Bash 4 manual:

      Words of the form $string are treated specially.  The word expands to
      string, with backslash-escaped characters replaced as specified by the
      ANSI C standard.

Oops... looks like the single quotes vanished somewhere along the way
there.




reply via email to

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