{bashful} provides a means to execute bash shell script(s) from within LaTeX.
The {bashful} package permits users to execute bash shell scripts from within LaTeX text files. The -shell-escape flag should be enabled when your LaTeX document is processed by the LaTeX engine.