base-files, busybox: fix 22279, simplify code and get rid of awk