resume/tex/Shell.tex
2024-03-06 01:21:25 +03:00

6 lines
250 B
TeX

% \getenv[\HOME]{HOME} % Example: Store $HOME shell var into \HOME cmd.
\usepackage{catchfile}
\newcommand{\getenv}[2][]{%
\CatchFileEdef{\Temp}{"|kpsewhich --var-value #2"}{\endlinechar=-1}%
\if\relax\detokenize{#1}\relax\Temp\else\let#1\Temp\fi}