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

According to Jim Meyering on 12/30/2009 1:44 AM:
>>   find modules -name '*-tests' | xargs grep -l License \
>>     | xargs sed -i '/^$/N; /License:/,$ d'
> 
> Those changes look fine.  Thanks.
> 
> In case there's a next time, you'd want to add a "^"
> before the "License:" in that sed command:

That wouldn't have worked.  The previous N command, to also delete the
blank line prior to the License line, means that License is no longer at
the beginning of the pattern stream.  But this would do it:

sed -i '/^$/N; /\n*License:$/,$ d'

> Otherwise, there is a small risk of malfunction.
> Currently we're safe: there *are* unrelated occurrences of "License",
> but none with a following colon.

Yep, I worried about that too, which is why I manually inspected the
results of the sed call before committing ;)

- --
Don't work too hard, make some time for fun as well!

Eric Blake             e...@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAks7SbYACgkQ84KuGfSFAYCDIwCgs4H9woXh3cLuLyJEomy5v3LA
7u0AnjN5AGqUmom0SSAaTTGhUvKCin7L
=bAB1
-----END PGP SIGNATURE-----


Reply via email to