ChangeLogのgrepを使う

前回はChangeLogを抽出しましたが、わざわざこねくり回さなくとも、ChangeLog用のgrepがあります。

manを確認します。

takk@deb9:~$ man grep-changelog
grep-changelog(1)           General Commands Manual          grep-changelog(1)

NAME
       grep-changelog - print ChangeLog entries matching criteria

SYNOPSIS
       grep-changelog [options] [CHANGELOG...]

DESCRIPTION
       grep-changelog searches the named CHANGELOGs (by default files matching
       the regular expressions ChangeLog and  ChangeLog\.[0-9]+)  for  entries
       matching  the  specified criteria.  At least one option or file must be
       specified.  This program is distributed with GNU Emacs.

OPTIONS
       The program accepts unambiguous abbreviations for option names.

       --author=AUTHOR
              Print entries whose author matches regular expression AUTHOR.

       --text=TEXT
              Print entries whose text matches regular expression TEXT.

使ってみましょう。
ChangeLog-2010から、bin2cを変更したログを抽出します。

takk@deb9:~/src/binutils-2.28/binutils$ grep-changelog --text=bin2c ChangeLog-2010
2010-11-05  Alan Modra  <amodra@gmail.com>

	* bin2c.c: Remove internationalization and version report.
2010-11-05  Alan Modra  <amodra@gmail.com>

	* Makefile.am: Update bin2c rule.
2010-01-26  Tristan Gingold  <gingold@adacore.com>

	* Makefile.am (bin2c): Add libintl dependance and library.
takk@deb9:~/src/binutils-2.28/binutils$ 

次は、複数のChangeLogから、bin2cに係るログで、作者をAlanさんで指定。

takk@deb9:~/src/binutils-2.28/binutils$ grep-changelog --text=bin2c --author=Alan ChangeLog*
2007-02-28  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am (PROGS): Add BUILD_INSTALL_MISC.
	(bin_PROGRAMS): Replace BUILD_MISC with BUILD_INSTALL_MISC.
	(EXTRA_PROGRAMS): Remove bin2c.
	(bin2c$(EXEEXT_FOR_BUILD)): New rule.
	(bin2c_SOURCES): Delete.
	(DISTCLEANFILES): Remove sysinfo.
	(MOSTLYCLEANFILES): Add sysinfo$(EXEEXT_FOR_BUILD) and
	bin2c$(EXEEXT_FOR_BUILD).
2007-02-28  Alan Modra  <amodra@bigpond.net.au>

	* configure.in (BUILD_MISC): Add $(EXEEXT_FOR_BUILD) to bin2c.
	Move embedspu to..
	(BUILD_INSTALL_MISC): ..here.
2007-02-27  Alan Modra  <amodra@bigpond.net.au>

	* bin2c.c: New file.
2007-02-27  Alan Modra  <amodra@bigpond.net.au>

	* Makefile.am (EXTRA_PROGRAMS): Add bin2c.
	(CFILES): Add bin2c.c.
	(bin2c_SOURCES): Define.
	(bin2c.o): Dependencies from "make dep-am".
2007-02-27  Alan Modra  <amodra@bigpond.net.au>

	* configure.in (BUILD_MISC): Add bin2c.
2008-08-25  Alan Modra  <amodra@bigpond.net.au>

	* bin2c.c (O_BINARY, O_TEXT, SET_BINARY): Don't define here.
2010-11-05  Alan Modra  <amodra@gmail.com>

	* bin2c.c: Remove internationalization and version report.
2010-11-05  Alan Modra  <amodra@gmail.com>

	* Makefile.am: Update bin2c rule.
takk@deb9:~/src/binutils-2.28/binutils$ 

スッキリ、抽出されました。

コメント

タイトルとURLをコピーしました