resume/tex/Shell.tex

6 lines
250 B
TeX
Raw Normal View History

2024-03-06 03:56:08 +03:00
% \GetEnv[\HOME]{HOME} % Example: Store $HOME shell var into \HOME cmd.
2024-03-06 01:12:17 +03:00
\usepackage{catchfile}
2024-03-06 03:56:08 +03:00
\newcommand{\GetEnv}[2][]{%
2024-03-06 01:12:17 +03:00
\CatchFileEdef{\Temp}{"|kpsewhich --var-value #2"}{\endlinechar=-1}%
\if\relax\detokenize{#1}\relax\Temp\else\let#1\Temp\fi}