lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAJ1xhMWf0T4i6FmTao49oOnj5OD7oX1FDrZE8Vbx=_hH6sNfgg@mail.gmail.com>
Date:	Thu, 1 Oct 2015 21:36:47 +0300
From:	Alexander Kapshuk <alexander.kapshuk@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Greg KH <gregkh@...uxfoundation.org>
Subject: [PATCH] ver_linux: jfsutils.patch

Not to be critical of anyone, I believe that using 'grep' along with
'sed', and 'awk' in this kind of context as a one-off quick solution to
be run on the command line may very well be justified.
However, in a script, 'awk' or 'sed' are more than capable of doing most
of the things we may be looking to achieve by using a combination of
'grep', 'sed', and 'awk'.

The proposed implementation relies on 'sed' to perform all the text
processing required.

Tested on:
Arch Linux

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@...il.com>
---

--- linux/scripts/ver_linux.orig    2015-08-30 21:34:09.000000000 +0300
+++ linux/scripts/ver_linux    2015-09-30 22:42:39.748757706 +0300
@@ -30,8 +30,14 @@
 tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' |  awk \
 'NR==1 {print "e2fsprogs             ", $2}'

-fsck.jfs -V 2>&1 | grep version | sed 's/,//' |  awk \
-'NR==1 {print "jfsutils              ", $3}'
+fsck.jfs -V 2>&1 |
+sed '
+    /version/!d
+    s/.*version[ \t]//
+    s/[ \t].*//
+    s/[^0-9]$//
+    s/^/jfsutils\t/
+'

 reiserfsck -V 2>&1 | grep ^reiserfsck | awk \
 'NR==1{print "reiserfsprogs         ", $2}'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ