3

I would like too use the bashful package but an error occured. I wrote this simple code (test.tex):

\documentclass{article}
\usepackage{bashful}

\begin{document}
\bash
ls
\END
\end{document}

and the compilation failed :

L7: I will now print the contents of file test.stderr (if found)
L7: File test.stderr was empty
L7: Proceeding as usual
L7: Checking whether any listings are required
L7: Nothing has to be listed
L7: Defining macro for the contents of the standard output file
L7: Opened file test.stdout
L7: File test.stdoutwas empty
after EOF
L7: bashStdout :=
\bashStdout 

L7: Closing file test.stdout
L7: Defining macro for the contents of the standard error file
L7: Opened file test.stderr
L7: File test.stdoutwas empty
! Undefined control sequence.
<write> ...nputlineno : bashStderr :=
\bashStderr 

l.7 \END
        ^^M
? 

I don't figure it out. Is something missing ?

Stan
  • 173

1 Answers1

3

You have to use latex with the --shell-escape flag (otherwise bash is prevented from running and you get the error you show)

Also if you want to see the output in the document you need [stdout] so:

\documentclass{article}
\usepackage{bashful}

\begin{document}
\bash[stdout]
ls
\END
\end{document}
David Carlisle
  • 757,742
  • Thank you very much ! I saw this in other posts, but I didn't understand, untill now. – Stan Jan 16 '16 at 16:03