Simple scripts? Have you looked at the shit in /etc/init.d in a modern linux distribution?
$ wc -l * | sort -n | tail
274 exim4
286 apache2
290 dnsmasq
298 nfs-common
350 clamav-freshclam
364 udev
386 checkroot.sh
420 clamav-daemon
465 clamav-milter
9893 total
If you look into these, you'll find tons of near-duplicate code between scripts, and frequently every script reinvents the wheel in one way or another.