Re: New option for md5sum
On 04/19/2014 04:48 AM, Bob Proulx wrote: Rather than cut and using an exact number of characters I prefer to use awk to cut by fields. That way it works with all of the *sum programs. $ md5sum /dev/null | awk '{print$1}' And there are many other ways: # using the field option of cut: $ md5sum /dev/null | src/cut -d ' ' -f 1 d41d8cd98f00b204e9800998ecf8427e $ md5sum /dev/null | sed 's/ .*$//' d41d8cd98f00b204e9800998ecf8427e etc. Therefore 80:20 against a new option from me, too. Have a nice day, Berny
Re: New option for md5sum
Bernhard Voelker mail-hqe9kzqpbdrht4tgq10purvvk+yq3...@public.gmane.org writes: On 04/19/2014 04:48 AM, Bob Proulx wrote: Rather than cut and using an exact number of characters I prefer to use awk to cut by fields. That way it works with all of the *sum programs. $ md5sum /dev/null | awk '{print$1}' And there are many other ways: # using the field option of cut: $ md5sum /dev/null | src/cut -d ' ' -f 1 d41d8cd98f00b204e9800998ecf8427e $ md5sum /dev/null | sed 's/ .*$//' d41d8cd98f00b204e9800998ecf8427e None of them handle quoted file names: $ md5sum a\\b | awk '{print$1}' \d41d8cd98f00b204e9800998ecf8427e Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely different.
Re: New option for md5sum
On 04/19/2014 08:58 AM, Andreas Schwab wrote: Bernhard Voelker mail-hqe9kzqpbdrht4tgq10purvvk+yq3...@public.gmane.org writes: On 04/19/2014 04:48 AM, Bob Proulx wrote: Rather than cut and using an exact number of characters I prefer to use awk to cut by fields. That way it works with all of the *sum programs. $ md5sum /dev/null | awk '{print$1}' And there are many other ways: # using the field option of cut: $ md5sum /dev/null | src/cut -d ' ' -f 1 d41d8cd98f00b204e9800998ecf8427e $ md5sum /dev/null | sed 's/ .*$//' d41d8cd98f00b204e9800998ecf8427e None of them handle quoted file names: $ md5sum a\\b | awk '{print$1}' \d41d8cd98f00b204e9800998ecf8427e The first proposed option using indirection does. If that's awkward from a programmatic context, then in such a context it would be trivial (albeit not obvious) to strip. Pádraig.
[PATCH] maint: make ChangeLog generation more robust
* Makefile.am (gen-ChangeLog): Sync changes from GNU hello to, ensure exit status is propagated and to support an optional git-log-fix file. --- Makefile.am |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8a38acd..7eb2d5c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -105,11 +105,12 @@ gen_start_date = 2008-02-08 .PHONY: gen-ChangeLog gen-ChangeLog: $(AM_V_GEN)if test -d .git; then\ + log_fix=$(srcdir)/build-aux/git-log-fix;\ + test -e $$log_fix amend_git_log=--amend=$$log_fix; \ $(top_srcdir)/build-aux/gitlog-to-changelog \ - --amend=$(srcdir)/build-aux/git-log-fix \ - --since=$(gen_start_date) $(distdir)/cl-t;\ - rm -f $(distdir)/ChangeLog; \ - mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + $$amend_git_log --since=$(gen_start_date) $(distdir)/cl-t \ + { rm -f $(distdir)/ChangeLog \ + mv $(distdir)/cl-t $(distdir)/ChangeLog; }\ fi ALL_RECURSIVE_TARGETS += distcheck-hook -- 1.7.7.6
Re: [PATCH] maint: make ChangeLog generation more robust
On Sat, Apr 19, 2014 at 4:51 AM, Pádraig Brady p...@draigbrady.com wrote: * Makefile.am (gen-ChangeLog): Sync changes from GNU hello to, ensure exit status is propagated and to support an optional git-log-fix file. Hi Pádraig, Thank you for repairing that. Your change looks fine.