Wrap up the call to 'mount --version', the code to process its output, and the resulting formatted output in awk functions.
Signed-off-by: Alexander Kapshuk <alexander.kaps...@gmail.com> --- scripts/ver_linux | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/ver_linux b/scripts/ver_linux index 58aafb3..d8a6cfe 100755 --- a/scripts/ver_linux +++ b/scripts/ver_linux @@ -15,13 +15,8 @@ BEGIN { printversion("GNU C", version("gcc -dumpversion 2>&1")) printversion("GNU Make", version("make --version 2>&1")) printversion("Binutils", version("ld -v 2>&1")) - -mount --version 2>&1 | -awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{ - match($0, /[0-9]+([.]?[0-9]+)+/) - $0 = substr($0,RSTART,RLENGTH) - printf("Util-linux\t\t%s\nMount\t\t\t%s\n",$0,$0) -}' + printversion("Util-linux", version("mount --version 2>&1")) + printversion("Mount", version("mount --version 2>&1")) depmod -V 2>&1 | awk '/[0-9]+([.]?[0-9]+)+/ && !/not found$/{ -- 2.7.3