public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/22] ver_linux: gcc -dumpversion, use regex to find version number
@ 2015-10-12 18:39 Alexander Kapshuk
  2015-10-12 18:39 ` [PATCH 02/22] ver_linux: make --version, " Alexander Kapshuk
                   ` (22 more replies)
  0 siblings, 23 replies; 29+ messages in thread
From: Alexander Kapshuk @ 2015-10-12 18:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: gregkh, jim.epost, richard, tytso, Alexander Kapshuk

Rely on regex to find the version number, rather than a field number.

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
---
 scripts/ver_linux | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/ver_linux b/scripts/ver_linux
index 7de36df..af6467e 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -11,8 +11,12 @@ echo ' '
 uname -a
 echo ' '
 
-gcc -dumpversion 2>&1| awk \
-'NR==1{print "Gnu C                 ", $1}'
+gcc -dumpversion 2>&1 |
+awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{
+	match($0, /[0-9]+([.]?[0-9]+)+/)
+	printf("GNU C\t\t\t%s\n",
+	substr($0,RSTART,RLENGTH))
+}'
 
 make --version 2>&1 | awk -F, '{print $1}' | awk \
       '/GNU Make/{print "Gnu make              ",$NF}'
-- 
2.4.9


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-12-02 14:24 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 18:39 [PATCH 01/22] ver_linux: gcc -dumpversion, use regex to find version number Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 02/22] ver_linux: make --version, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 03/22] ver_linux: binutils, fix inaccurate output Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 04/22] ver_linux: util-linux, 'fdformat' not ubiquitous any longer Alexander Kapshuk
2015-10-12 22:04   ` Jim Davis
2015-10-12 18:39 ` [PATCH 05/22] ver_linux: module-init-tools, look for numerical input, not field number Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 06/22] ver_linux: e2fsprogs, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 07/22] ver_linux: jfsutils, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 08/22] ver_linux: reiserfsprogs, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 09/22] ver_linux: xfsprogs, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 10/22] ver_linux: pcmciautils, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 11/22] ver_linux: quota-tools, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 12/22] ver_linux: ppp, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 13/22] ver_linux: libc, input redirection to sed fails in some distros Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 14/22] ver_linux: ldd, look for numerical input, not field number Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 15/22] ver_linux: libcpp, fix missing output Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 16/22] ver_linux: procps, look for numerical input, not field number Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 17/22] ver_linux: net-tools, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 18/22] ver_linux: loadkeys, " Alexander Kapshuk
2015-10-12 18:39 ` [PATCH 19/22] ver_linux: sh-utils, " Alexander Kapshuk
2015-10-12 18:40 ` [PATCH 20/22] ver_linux: use 'udevadm', instead of 'udevinfo' Alexander Kapshuk
2015-10-12 18:40 ` [PATCH 21/22] ver_linux: wireless-tools, look for numerical input, not field number Alexander Kapshuk
2015-10-12 18:40 ` [PATCH 22/22] ver_linux: proc/modules, limit text processing to 'sed' Alexander Kapshuk
2015-10-12 20:22   ` Jim Davis
2015-10-13 17:33     ` Alexander Kapshuk
2015-10-13 23:21 ` [PATCH 01/22] ver_linux: gcc -dumpversion, use regex to find version number Jim Davis
2015-10-14  9:29   ` Alexander Kapshuk
2015-10-14 21:43     ` Jim Davis
2015-12-02 14:24 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox