N.B. first I was using only shlex but it is kind of slow...