Bash Script Parse String Python Functions