Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple spaces between columns with grep 1

Status
Not open for further replies.

PSD

Instructor
Apr 25, 2000
392
GB
Hi all,

On AIX I had some problems with \s+ matching spaces so ended up using [[:blank:]]. But if there are multiple spaces between two words in a file, what is the best way of using [[:blank:]] without typing it more than once? Also the number of space varies per line, so there is no fixed number of spaces.

Any ideas?

Many thanks

Paul
 
Hi

Just add the [tt]+[/tt] quantifier after that too : [tt][[:blank:]][highlight]+[/highlight][/tt].

By the way, [tt]\s[/tt]'s corresponding POSIX character class is actually [tt][[:space:]][/tt].

Feherke.
feherke.github.io
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top