[Gllug] regular expression

Paul Cupis paul at cupis.co.uk
Sun Aug 8 07:04:27 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 05 August 2004 14:55, "Martin A. Brooks" 
<martin at clues.ltd.uk> wrote:
> echo "/Dir /with  ugly/spaces/in it" | perl -e '$_=<>;s/ /\\
> /g;print;'

Hmm, nice perl construct...

  perl -pi -e 's/ /\\ /g'

is much simpler.

Paul Cupis
- -- 
paul at cupis.co.uk

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iEYEARECAAYFAkEV0KMACgkQIzuKV+SHX/nnJgCeOK5qP70iKu7zACaNzG1aJiU8
5N8AnA4IDIgmXI666p6IGsmIEfs0idkV
=fbY+
-----END PGP SIGNATURE-----
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list