[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Syntax for tab character
From: |
Bill Gradwohl |
Subject: |
Syntax for tab character |
Date: |
Fri, 24 Apr 2009 11:32:09 -0600 |
I know that
parameter="${parameter//[0123456789]}"
will remove all numerics
What I want to do is remove all the space and tab characters.
So far I've only been able to do it as follows:
parameter="${parameter// }" #:# Convert any spaces to null
parameter="${parameter//'\t'}" #:# Convert any tabs to null
I can't find a way to put both a space and a tab inside a [] construct
so as to be able to state it in one line of code. I don't want to put an
invisible tab character into the [] construct, I want to put the visible
'\t' in it.
Is there a way to say it that is syntactically correct?
[ \t] # doesn't work
[ '\t'] # doesn't work
I've even tried assigning as follows:
spaceTab=' \t'
[${spaceTab}] # doesn't work
--
Bill Gradwohl
signature.asc
Description: This is a digitally signed message part
- Syntax for tab character,
Bill Gradwohl <=
- Re: Syntax for tab character, Greg Wooledge, 2009/04/24
- Re: Syntax for tab character, Chet Ramey, 2009/04/24
- Re: Syntax for tab character, Bill Gradwohl, 2009/04/24
- Re: Syntax for tab character, Bill Gradwohl, 2009/04/24
- Re: Syntax for tab character, Andreas Schwab, 2009/04/24
- Re: Syntax for tab character, Chet Ramey, 2009/04/24
- Re: Syntax for tab character, Bill Gradwohl, 2009/04/25
- Re: Syntax for tab character, Andreas Schwab, 2009/04/25
- Re: Syntax for tab character, Bill Gradwohl, 2009/04/25