i think the team needs to learn how to save some resources by not spawning so many unnessissary "cat" processes. (they may also need to man test || man bash) ALSA Doc: ~~~~~~~~ Code listing 2.3 #cat /proc/pci | grep audio should be... #grep audio /proc/pci Gentoo FAQ Doc: ~~~~~~~~~~~~~~ Code listing 5.1 # cat /var/log/syslog.d/current | tai64nlocal | less could be... # tai64nlocal < /var/log/syslog.d/current | less rc-scripts: ~~~~~~~~~~ $ grep -R 'cat ' /etc ... /etc/init.d/hostname: if [ ! -f /etc/hostname ] || [ -z "$(cat /etc/hostname)" ] ... /etc/init.d/xfs: if [ "$(cat $1/fonts.list | md5sum)" != "$(echo "${fontlist}" | md5sum)" ] ... /etc/runlevels/boot/serial: local res="$(cat /proc/modules | egrep 'serial' | cut -f1 -d" ")" ... WTF?
The doc bugs are resolved now. i'm reposting this bug.. there are 'rc-scripts' devs who can answer the last one.
/etc/init.d/hostname: if [ ! -f /etc/hostname ] || [ -z "$(cat /etc/hostname)" ] i dont see a problem with this ... i mean the only thing you could change it to would be $(</etc/hostname) and that isnt great imo ... /etc/init.d/xfs: if [ "$(cat $1/fonts.list | md5sum)" != "$(echo "${fontlist}" | md5sum)" ] this is invalid ... i mean the only way to get the outputs to be the same is if you md5sum'ed them both from stdin ... yes you could cut/awk the first param out, but that goes along the same line of 'why spawn so many XXX processes' ... /etc/runlevels/boot/serial: local res="$(cat /proc/modules | egrep 'serial' | cut -f1 -d" ")" this could be changed to: $(grep serial /proc/modules | awk '{print $1}')
actually about the hostname one, heres a good reason for changing it from $(cat /etc/hostname) to $(</etc/hostname) `man bash` says: The command substitution $(cat file) can be replaced by the equivalent but faster $(< file).
/etc/init.d/hostname: Fixed /etc/init.d/xfs: Do not see an issue. /etc/runlevels/boot/serial: Its actually /etc/init.d/serial, but fixed anyhow. I sometimes wish bored people will get something to keep *themselfs* busy, not make more work for *already* busy other people.