bash implementation of splitlen from hashcat-utils