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

Pb avec SED et ligne blanche



On Mon, Jun 11, 2001 at 05:43:34AM -0500, Alain Tésio wrote:
> Je réessaye, mon mailer web ne marche pas très bien (s'il rajoute des
> backslashes il faut les virer sauf s'ils sont doublés)

Il ne met pas d'objet non plus.

> tesio@chameau:~ 118> python -c 'import re,sys,string; \
> print string.join(re.match("(.*)# debut bloc 2.*# fin bloc 2\n\n\n(.*)" ,\
> sys.stdin.read(),re.M+re.S).groups())' < test.replace

Ou si on n'aime pas les foo.bar.baz mais préfère perl

$ perl -0777pe 's/# debut bloc 1.*# fin bloc 1\s*//s;' <test

* huggie attend la solution en dd/sh.

-- 
----------( "Ah.  So you're a waffle man!" - Talkie Toaster  )----------
Simon ----(                                                  )---- Nomis
                             Htag.pl 0.0.18



Reply to: