2

Since the author of the package \bashful claims:

The pack­age may use other Unix shells than bash, but does not work with­out mod­i­fi­ca­tion in a Win­dows en­vi­ron­ment. https://ctan.org/pkg/bashful

... I'm wondering what kind of modification this will be.

When I try to run the simple mwe (with shell-escape on a Windows-system using cmd or Power-Shell):

\documentclass{article}
\usepackage{bashful}
\begin{document}
\bash
ls
\END
\end{document}

... all I get is this error:

! This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX) ! (preloaded format=pdflatex) \write18 enabled. entering extended mode ! (./minimal.tex LaTeX2e <2018-12-01> ! (c:/texlive/2018/texmf-dist/tex/latex/base/article.cls Document Class: ! article 2018/09/03 v1.4i Standard LaTeX document class ! (c:/texlive/2018/texmf-dist/tex/latex/base/size10.clo)) ! (c:/texlive/2018/texmf-dist/tex/latex/bashful/bashful.sty ! (c:/texlive/2018/texmf-dist/tex/latex/xcolor/xcolor.sty ! (c:/texlive/2018/texmf-dist/tex/latex/graphics-cfg/color.cfg) ! (c:/texlive/2018/texmf-dist/tex/latex/graphics-def/pdftex.def)) ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/catchfile.sty ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/infwarerr.sty) ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/ltxcmds.sty) ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/etexcmds.sty ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/ifluatex.sty))) ! (c:/texlive/2018/texmf-dist/tex/latex/xkeyval/xkeyval.sty ! (c:/texlive/2018/texmf-dist/tex/generic/xkeyval/xkeyval.tex ! (c:/texlive/2018/texmf-dist/tex/generic/xkeyval/xkvutils.tex ! (c:/texlive/2018/texmf-dist/tex/generic/xkeyval/keyval.tex)))) ! (c:/texlive/2018/texmf-dist/tex/latex/base/textcomp.sty ! (c:/texlive/2018/texmf-dist/tex/latex/base/ts1enc.def ! (c:/texlive/2018/texmf-dist/tex/latex/base/ts1enc.dfu))) ! (c:/texlive/2018/texmf-dist/tex/latex/listings/listings.sty ! (c:/texlive/2018/texmf-dist/tex/latex/listings/lstmisc.sty) ! (c:/texlive/2018/texmf-dist/tex/latex/listings/listings.cfg))) ! (./minimal.aux) (c:/texlive/2018/texmf-dist/tex/latex/base/ts1cmr.fd) ! (c:/texlive/2018/texmf-dist/tex/context/base/mkii/supp-pdf.mkii ! [Loading MPS to PDF converter (version 2006.09.02).] )Der Befehl ! "bash" ist entweder falsch geschrieben oder konnte nicht gefunden ! werden. system returned with code 1 ! ! L6: I will now print the contents of file minimal.stderr (if found) ! L6: File minimal.stderr was empty L6: Proceeding as usual L6: Checking ! whether any listings are required L6: Nothing has to be listed L6: ! Defining macro for the contents of the standard output file L6: Opened ! file minimal.stdout L6: File minimal.stdoutwas empty after EOF L6: ! bashStdout := \bashStdout ! ! L6: Closing file minimal.stdout L6: Defining macro for the contents of ! the standard error file L6: Opened file minimal.stderr L6: File ! minimal.stdoutwas empty ! Undefined control sequence. ! ...nputlineno : bashStderr := \bashStderr ! ! l.6 \END ! ^^M ? L6: bashStderr := ! ! ! L6: Closing file minimal.stderr L6: Wrap up done L6: bashV: Done! ! (./minimal.aux) ) No pages of output. Transcript written on ! minimal.log. PS ! D:\OneDrive\Dokumente__Projekte\TEX_Bilderliste\minimal> PS ! D:\OneDrive\Dokumente__Projekte\TEX_Bilderliste\minimal> pdflatex ! -shell-escape minimal.tex This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX) (preloaded format=pdflatex) \write18 enabled. entering extended mode ! (./minimal.tex LaTeX2e <2018-12-01> ! (c:/texlive/2018/texmf-dist/tex/latex/base/article.cls Document Class: ! article 2018/09/03 v1.4i Standard LaTeX document class ! (c:/texlive/2018/texmf-dist/tex/latex/base/size10.clo)) ! (c:/texlive/2018/texmf-dist/tex/latex/bashful/bashful.sty ! (c:/texlive/2018/texmf-dist/tex/latex/xcolor/xcolor.sty ! (c:/texlive/2018/texmf-dist/tex/latex/graphics-cfg/color.cfg) ! (c:/texlive/2018/texmf-dist/tex/latex/graphics-def/pdftex.def)) ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/catchfile.sty ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/infwarerr.sty) ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/ltxcmds.sty) ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/etexcmds.sty ! (c:/texlive/2018/texmf-dist/tex/generic/oberdiek/ifluatex.sty))) ! (c:/texlive/2018/texmf-dist/tex/latex/xkeyval/xkeyval.sty ! (c:/texlive/2018/texmf-dist/tex/generic/xkeyval/xkeyval.tex ! (c:/texlive/2018/texmf-dist/tex/generic/xkeyval/xkvutils.tex ! (c:/texlive/2018/texmf-dist/tex/generic/xkeyval/keyval.tex)))) ! (c:/texlive/2018/texmf-dist/tex/latex/base/textcomp.sty ! (c:/texlive/2018/texmf-dist/tex/latex/base/ts1enc.def ! (c:/texlive/2018/texmf-dist/tex/latex/base/ts1enc.dfu))) ! (c:/texlive/2018/texmf-dist/tex/latex/listings/listings.sty ! (c:/texlive/2018/texmf-dist/tex/latex/listings/lstmisc.sty) ! (c:/texlive/2018/texmf-dist/tex/latex/listings/listings.cfg))) ! (./minimal.aux) (c:/texlive/2018/texmf-dist/tex/latex/base/ts1cmr.fd) ! (c:/texlive/2018/texmf-dist/tex/context/base/mkii/supp-pdf.mkii ! [Loading MPS to PDF converter (version 2006.09.02).] )Der Befehl ! "bash" ist entweder falsch geschrieben oder konnte nicht gefunden ! werden. system returned with code 1 ! ! L6: I will now print the contents of file minimal.stderr (if found) ! L6: File minimal.stderr was empty L6: Proceeding as usual L6: Checking ! whether any listings are required L6: Nothing has to be listed L6: ! Defining macro for the contents of the standard output file L6: Opened ! file minimal.stdout L6: File minimal.stdoutwas empty after EOF L6: ! bashStdout := \bashStdout ! ! L6: Closing file minimal.stdout L6: Defining macro for the contents of ! the standard error file L6: Opened file minimal.stderr L6: File ! minimal.stdoutwas empty ! Undefined control sequence. ! ...nputlineno : bashStderr := \bashStderr ! ! l.6 \END ! ^^M ?

The highlighted part means: The command "bash" is either misspelled or could not be found. This indicates that there is a very essential problem with the setup, right?

Can anyone please shed some light? Thanks in advance!

  • 1
    Welcome to TeX.SX! Windows does not use bash or anything shell-alike (in the unix sense). The easiest solution would be to install bash for windows. – TeXnician Jan 3 at 7:58
  • Thank you Texnician. Installing bash does the trick. I also installed latex and the \bashful package within the bash and it now runs like a charm. – バニーダーク Jan 3 at 15:14
  • 4
    I'm voting to close this question as solved in comments – Troy Jan 6 at 4:10
  • 1
    I'm voting to not close this question, as it still would be interesting if or how a native solution for a port of this package to Windows systems would look like – siracusa Jan 6 at 5:06
  • I agree with siracusa. @バニーダーク Would you be willing to write up an answer how you solved it? – TeXnician Jan 6 at 8:58
2

First I'd like to highlight that this would be a Windows-10-way only, since you have to activate some Windows-10-specific things. Windows 8 & 7 etc. users have to look for corresponding tutorials.

As @Texnician mentioned:

Windows does not use bash or anything shell-alike (in the unix sense).

1. Installing Bash for Windows

  • get access to the Windows settings: WIN + I

    • Update and Security
    • For Developers
    • activate Developer Mode
  • get access to your Control Panel

    • Programs
    • Turn Windows features on or off
    • activate Windows-subsystem for Linux

What we get is a ubuntu-bash by canonical.

WIN + type "bash" will open the bash terminal.

Alternatively - cmd: type "bash" - Powershell: type "bash"

2. Installing Latex (TeX Live)

sudo apt-get install texlive-base

2.1 Install \bashul package

Since I'm not a Linux user at all I just followed the suggestions that were made in this thread How do I install an individual package on a Linux system? There might be a better way to get \bashful. blush

sudo apt-get install texlive-latex-extra --no-install-recommends

3. Utilize \bashful

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.