Piped shell \input
Andreas Scherer
andreas_tex at freenet.de
Tue Jun 21 18:54:00 CEST 2022
Dear TeX hackers,
Do you see any chance to replace this working (!) example
\newcount\countD \countD=0
\ifpdftex \ifnum\pdfshellescape=1
\countD=\input{|"countmodules \jobname.tex"} \fi\fi
(from pwebmactex in development:
https://github.com/ascherer/web/blob/master/pwebmac.tex#L88 in
conjunction with the shell script countmodules:
https://github.com/ascherer/web/blob/master/countmodules)
with the desired compact version
\newcount\countD \countD=0
\ifpdftex \ifnum\pdfshellescape=1
\countD=\input{|"grep \\\\:\\\\X \jobname.tex | wc -l"} \fi\fi
leaving out the external shell script?
Thanks in advance,
Andreas
More information about the texhax
mailing list.