Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1245972

Re: [PATCH 22/22] ver_linux: proc/modules, limit text processing to 'sed'

From Alexander Kapshuk <alexander.kapshuk@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 22/22] ver_linux: proc/modules, limit text processing to 'sed'
Date 2015-10-13 19:40 +0200
Message-ID <qjbIm-53L-31@gated-at.bofh.it> (permalink)
References <qiQkx-7rT-3@gated-at.bofh.it> <qiQkz-7rT-45@gated-at.bofh.it> <qiRTk-1ps-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Oct 12, 2015 at 11:22 PM, Jim Davis <jim.epost@gmail.com> wrote:
> On Mon, Oct 12, 2015 at 11:40 AM, Alexander Kapshuk
> <alexander.kapshuk@gmail.com> wrote:
>> This patch is more of a personal preference, rather than a fix for a problem.
>
> Using the sed hold space isn't exactly easy to follow...  if, unlike
> the other patches, there isn't some potential improvement over the
> status quo I'd suggest sticking with the original version.
>
> --
> Jim

Thanks for your feedback.

If the use of a shell variable to store the generated list of modules
be deemed more favourable than the use of the 'sed' hold space, may I
at least suggest either of the two approaches below:

Sorted list:
Y=`sort /proc/modules | sed 's/ .*$//'`

Unsorted list:
Z=`sed 's/ .*$//' /proc/modules`

The use of 'cat' in the context of the original implementation is redundant.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/22] ver_linux: gcc -dumpversion, use regex to find version number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 22/22] ver_linux: proc/modules, limit text processing to 'sed' Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
    Re: [PATCH 22/22] ver_linux: proc/modules, limit text processing to 'sed' Jim Davis <jim.epost@gmail.com> - 2015-10-12 22:30 +0200
      Re: [PATCH 22/22] ver_linux: proc/modules, limit text processing to 'sed' Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-13 19:40 +0200
  [PATCH 21/22] ver_linux: wireless-tools, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 02/22] ver_linux: make --version, use regex to find version number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 14/22] ver_linux: ldd, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 17/22] ver_linux: net-tools, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 19/22] ver_linux: sh-utils, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 03/22] ver_linux: binutils, fix inaccurate output Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 18/22] ver_linux: loadkeys, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 05/22] ver_linux: module-init-tools, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 07/22] ver_linux: jfsutils, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 08/22] ver_linux: reiserfsprogs, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 16/22] ver_linux: procps, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 15/22] ver_linux: libcpp, fix missing output Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 13/22] ver_linux: libc, input redirection to sed fails in some distros Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  [PATCH 09/22] ver_linux: xfsprogs, look for numerical input, not field number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-12 20:50 +0200
  Re: [PATCH 01/22] ver_linux: gcc -dumpversion, use regex to find  version number Jim Davis <jim.epost@gmail.com> - 2015-10-14 01:30 +0200
    Re: [PATCH 01/22] ver_linux: gcc -dumpversion, use regex to find  version number Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-14 11:30 +0200
      Re: [PATCH 01/22] ver_linux: gcc -dumpversion, use regex to find  version number Jim Davis <jim.epost@gmail.com> - 2015-10-14 23:50 +0200

csiph-web