See also Bash FAQ 19.
In reply to Re: File splitting script by ambrus in thread File splitting script by Alien