Messages in this thread | | | Subject | Re: [PATCH v2] kbuild: check uniqueness of module names | From | Bernd Petrovitsch <> | Date | Fri, 17 May 2019 10:57:14 +0200 |
| |
On 17/05/2019 10:16, Alexander Kapshuk wrote: [...] > The 'xargs' '-r' flag is a GNU extension. > If POSIX compliance is important here, the use of 'cat', 'xargs' and > 'basename' may be substituted with that of 'sed' to initialise > same_name_modules: > sed 's!.*/!!' modules.order modules.builtin | sort | uniq -d
's!' is TTBOMK also a GNU-extension: sed 's/.*\///' modules.order modules.builtin | sort | uniq -d
> 'Sed' may also be used on its own in the 'for' loop instead of as part > of a pipeline along with 'grep' to generate the desired output: > sed '/\/'$m'/!d;s:^kernel/: :' modules.order modules.builtin
sed "/\/${m}/!d;s/^kernel\// /" modules.order modules.builtin
MfG, Bernd -- Bernd Petrovitsch Email : bernd@petrovitsch.priv.at LUGA : http://www.luga.at
| |