unix tool like head or tail but in random