script suggestion for initramfs chapter

"Thomas Seeling" ([email protected] via blfs-support Mailing List) <[email protected]> Mon, 27 Oct 2025 09:49:48 +0100
Newsgroups gmane.linux.lfs.beyond.support
Message-ID <[email protected]>
Hallo,

the chapter suggests a script to generate the initrd file, and it 
contains a line with unnecessary pipes.

|ldd /usr/sbin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted|

I suggest to reduce this to one `awk` invocation:

|ldd /usr/sbin/$f | awk '{print$1}'|

But: wouldn't it be wieder to use `print$(NF-1)` to get the full path of 
each library required, in case some libs are installed in distinct 
subdirectories?

In the output as of now I see lib names without path and one occurence 
of /lib64 with an absolute path.

Stay healthy,
Thomas

-- 
"Do you wanna be a legend or a passing footprint on the sands of time?"

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-support
Unsubscribe: See the above information page