selecting modules for kernel compilation automatically
Hi, Can someone please tell me why this does work: for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do echo $(basename $i .ko.xz); done; While this doesn't: for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do grep $(basename $i .ko.xz) /proc/modules; done; for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do lsmod | grep $(basename $i .ko.xz); done; Thanks, Mischa.
Re: selecting modules for kernel compilation automatically
On Sat, 2019-10-12 at 13:50 +0200, Mischa Baars wrote: > Hi, > > Can someone please tell me why this does work: > > > for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do > echo $(basename $i .ko.xz); done; > > While this doesn't: > > for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do > grep $(basename $i .ko.xz) /proc/modules; done; > for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do > lsmod | grep $(basename $i .ko.xz); done; > > Thanks, > Mischa. Never mind, I've probably been smoking too much. Thanks, Mischa.
Command grouping
Hi, Perhaps to better have a look at this mail, than the previous mail. In trying to group commands, in this case compiler commands, I found some peculiarities while trying different combinations of the 'Internal Field Separator' and the 'Parameter Expansion' operator ${parameter@P}. Perhaps someone can tell me if this is the behaviour that should have been expected or that something is broken. Thanks, Mischa. goodworx.tar.xz Description: application/xz-compressed-tar
Re: Command grouping
On 10/12/19 9:02 AM, Mischa Baars wrote: > Hi, > > Perhaps to better have a look at this mail, than the previous mail. > > In trying to group commands, in this case compiler commands, I found some > peculiarities while trying different combinations of the 'Internal Field > Separator' > and the 'Parameter Expansion' operator ${parameter@P}. I haven't looked at this in any depth, but you should realize that running declare IFS=$(printf ' \t\n') will result in IFS being set to space and tab, since command substitution removes the trailing newline. Maybe that will make a difference. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/