# latex l3sys get exit code of script

TeX - LaTeX Asked by aaaaaaaaaa on January 13, 2021

I am using l3sys of the latex3 interfaces, i need to get the exit code of a script after running it. I am running sys_get_shell:nnN, i tried giving it echo $? and echo$, but the shell for some reason interprets $? as the literal characters not the exit code of the last command, thus echo$? fails because it is missing one $for a math environment, and echo$? fails with ! TeX capacity exceeded, sorry [input stack size=5000]. for some reason, that i do not know.

Is there a way to make this work, or is there an interface to the exit code that i missed, or can i make a command fail if the script fails in some other way?

## Related Questions

### Description environment and textrm in math

2  Asked on April 9, 2021

### How to make the numbering of subsections independent from the numbering of sections?

2  Asked on April 9, 2021 by cal-paterson

### Multi-line curly brackets in a (text mode) table

2  Asked on April 9, 2021 by t-f

### Store URLs in a macro without replaceing # and %

2  Asked on April 9, 2021 by peter-grill

### Higlight a desired “n-th” author in fullcites in cleanthesis?

1  Asked on April 9, 2021 by jr

### Add a vertical image in the chapter page

0  Asked on April 9, 2021 by learning-from-masters

### How to make sure the header is not “floating”?

0  Asked on April 9, 2021 by soleil

### tikz: tabbing environment in nodes

1  Asked on April 9, 2021

### Vertical Rule in PGF Plottable

1  Asked on April 9, 2021 by stephank

### theorem numeration in appendix

1  Asked on April 9, 2021

### Mike tex Error hbf2gf (CJK ver. 4.8.4) Couldn’t open `tlir.cfg’

0  Asked on April 8, 2021 by benyettou-kamel

### How to renewenvironment that wrap the base environment?

1  Asked on April 8, 2021

### How to centre the root node of a tikz tree?

2  Asked on April 8, 2021

### Disable the outlining package in final mode

1  Asked on April 8, 2021

### Problem with alignment in list environment

0  Asked on April 8, 2021

### Replace ‘and’ with ampersand in bibliography and parenthetical citations using BibLaTeX

2  Asked on April 8, 2021 by itpetersen

### Chemfig – Forced departure and arrival atoms

1  Asked on April 8, 2021

### Looking for best way to write math notes using Latex and markdown

0  Asked on April 8, 2021 by tesio

### how to put an indent of 0.5in in apa7

1  Asked on April 8, 2021

### a quick way to add graph and sketches to lyx

0  Asked on April 8, 2021 by yonatan-marom