[H-GEN] regular expressions

Martin Pool mbp at linuxcare.com.au
Fri Aug 18 00:23:58 EDT 2000


On Fri, Aug 18, 2000 at 11:43:05AM +0800, Tom Atkinson wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and ]
> [ Unix-related topics.  Please observe the list's charter.          ]
> 
> The following sed script will replace multiple instances of white space
> with one 'a', for example:
> 
> sed 's/ */a/'

Alternatively:

  tr -s ' ' '|'

-s means `squish together multiple matches'.

-- 
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
mbp at linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20000818/7404677c/attachment.sig>


More information about the General mailing list