linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/32] ver_linux: complete awk implementation
@ 2016-06-28 10:18 Alexander Kapshuk
  2016-06-28 10:18 ` [PATCH 02/32] ver_linux: assign the usage message to a variable and print it Alexander Kapshuk
                   ` (31 more replies)
  0 siblings, 32 replies; 39+ messages in thread
From: Alexander Kapshuk @ 2016-06-28 10:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: gregkh, Alexander Kapshuk

The algorithm that extracts the version number of the utility being
queried, and prints the name of the utility and its version number is
currently implemented in awk. The code is used throughout the script,
making its use repetative. The proposed implementation confines the
algorithm in question to a function, which makes the script easier to
read overall, as well as considerably reduces the number of lines of
code. Every attempt has been made to retain the look and the format
generated by the current implementation.

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

diff --git a/scripts/ver_linux b/scripts/ver_linux
index 0d8bd29..30ecc6c 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/awk -f
 # Before running this script please ensure that your PATH is
 # typical as you use for compilation/installation. I use
 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may
 # differ on your system.
-#
+
 echo 'If some fields are empty or look unusual you may have an old version.'
 echo 'Compare to the current minimal requirements in Documentation/Changes.'
 echo ' '
-- 
2.7.3

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

end of thread, other threads:[~2016-08-22 17:00 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28 10:18 [PATCH 01/32] ver_linux: complete awk implementation Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 02/32] ver_linux: assign the usage message to a variable and print it Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 03/32] ver_linux: execute 'uname -a' from awk Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 04/32] ver_linux: wrap up call to 'gcc -dumpversion' in awk function Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 05/32] ver_linux: wrap up call to 'make --version' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 06/32] ver_linux: wrap up call to 'ld -v' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 07/32] ver_linux: wrap up call to 'mount --version' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 08/32] ver_linux: wrap up call to 'depmod -V' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 09/32] ver_linux: wrap up call to 'tune2fs' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 10/32] ver_linux: wrap up call to 'fsck.jfs -V' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 11/32] ver_linux: wrap up call to 'reiserfsck " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 12/32] ver_linux: wrap up call to 'fsck.reiser4 " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 13/32] ver_linux: wrap up call to 'xfs_db " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 14/32] ver_linux: wrap up call to 'pccardctl " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 15/32] ver_linux: wrap up call to 'cardmgr " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 16/32] ver_linux: wrap up call to 'quota " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 17/32] ver_linux: wrap up call to 'pppd --version' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 18/32] ver_linux: wrap up call to 'isdnctrl' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 19/32] ver_linux: wrap up call to 'showmount --version' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 20/32] ver_linux: wrap up querying for version of 'Linux C Library' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 21/32] ver_linux: wrap up call to 'ldd --version' " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 22/32] ver_linux: wrap up querying for version of 'Linux C++ Library' in awk functions Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 23/32] ver_linux: wrap up call to 'ps --version' in awk function Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 24/32] ver_linux: wrap up call to 'ifconfig " Alexander Kapshuk
2016-06-28 10:18 ` [PATCH 25/32] ver_linux: wrap up call to 'loadkeys -V' " Alexander Kapshuk
2016-06-28 10:19 ` [PATCH 26/32] ver_linux: wrap up call to 'oprofiled --version' " Alexander Kapshuk
2016-06-28 10:19 ` [PATCH 27/32] ver_linux: wrap up call to 'expr --v' " Alexander Kapshuk
2016-06-28 10:19 ` [PATCH 28/32] ver_linux: wrap up call to 'udevadm --version' " Alexander Kapshuk
2016-06-28 10:19 ` [PATCH 29/32] ver_linux: wrap up call to 'iwconfig " Alexander Kapshuk
2016-06-28 10:19 ` [PATCH 30/32] ver_linux: build a list of kernel modules as a string and print it Alexander Kapshuk
2016-06-28 10:19 ` [PATCH 31/32] ver_linux: 'version()' function definition Alexander Kapshuk
2016-06-28 10:19 ` [PATCH 32/32] ver_linux: 'printversion()' " Alexander Kapshuk
2016-06-28 12:47   ` Valdis.Kletnieks
2016-06-28 14:40     ` Alexander Kapshuk
2016-06-28 14:48       ` Valdis.Kletnieks
2016-07-02  7:29         ` Alexander Kapshuk
     [not found] ` <CAJ1xhMX3=tr3=EuFHjU6oiFTNrW5M2K32hEodBq_MrVtbKZB4g@mail.gmail.com>
     [not found]   ` <20160821081931.GA14367@kroah.com>
     [not found]     ` <CAJ1xhMWea18Jo_Xk5aDn3uy=uF_cwdC8eYo_mUMPLWvNH+jX9Q@mail.gmail.com>
2016-08-22  4:14       ` Fwd: Fwd: [PATCH 01/32] ver_linux: complete awk implementation Alexander Kapshuk
2016-08-22 10:00         ` Greg KH
2016-08-22 16:59           ` Alexander Kapshuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).