lkml.org 
[lkml]   [2015]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 22/22] ver_linux: proc/modules, limit text processing to 'sed'
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.


\
 
 \ /
  Last update: 2015-10-13 20:01    [W:0.134 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site