Wrap up the call to 'cardmgr -V', 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/ver_linux b/scripts/ver_linux index b2145a9..cdcd284 100755 --- a/scripts/ver_linux +++ b/scripts/ver_linux @@ -24,9 +24,7 @@ BEGIN { printversion("Reiser4fsprogs", version("fsck.reiser4 -V 2>&1")) printversion("Xfsprogs", version("xfs_db -V 2>&1")) printversion("Pcmciautils", version("pccardctl -V 2>&1")) - -cardmgr -V 2>&1| grep version | awk \ -'NR==1{print "pcmcia-cs ", $3}' + printversion("Pcmcia-cs", version("cardmgr -V 2>&1")) quota -V 2>&1 | awk '/version/{ -- 2.7.3