]> git.karo-electronics.de Git - linux-beck.git/commit
ver_linux: complete awk implementation
authorAlexander Kapshuk <alexander.kapshuk@gmail.com>
Mon, 22 Aug 2016 18:19:17 +0000 (21:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 11:59:31 +0000 (13:59 +0200)
commit2d187d58553becd61677a2db0181ff2c7b07c8a3
tree7fc5ff008d3437ed2d1d185714f1f70509fe4807
parenta46b195ca0d88134a6f60dc28532205075c70cff
ver_linux: complete awk implementation

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/ver_linux.awk [new file with mode: 0755]