The shlex module provides lexical tools for working with POSIX shell grammar.
