Re: [PATCH v2 8/8] hook-list.h: add a generated list of hooks, like config-list.h

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> +sed -n \
> +	-e '/^~~~~*$/ {x; s/^.*$/	"&",/; p;}' \
> +	-e 'x' \
> +	<Documentation/githooks.txt |
> +	LC_ALL=C sort

Thanks.  It is not wrong per-se, but if you are willing to do a
multi-line script for readability, wouldn't a much more readable
"single long and multi-line string" approach, i.e.

    sed -ne '
	/^~~~~*$/ {
		x
		s/^.*$/ "&",/
		p
	}
	x
    ' Documentation/githooks.txt |
    LC_ALL=C sort

work better?




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux