os:command queston

Dieter Schön dieter@REDACTED
Fri Apr 2 19:35:50 CEST 2021


addendum:

The error has nothing to do with the dot in oblivious.tex, it comes from 
"before" the first tex:

If I change the first tex to hex:

1> os:command(pdflatex --shell-escape hex/oblivious.tex).
* 3: syntax error before: hex

If I try a valid parameter, erlang complains that os:command doesn't exist:

5> os:command("ls").
** exception error: undefined function os:command/1

But in the case of the unquoted string pdflatex --shell-escape tex....

the erlang parser first tries to evaluate the function arguments

pdflatex is an atom,

--shell-escape probably parses to lists:subtract, atom, minus, atom

and the parser gives up.

Shouldn't it already complain when it cannot find command in module os?


regards,

dieter



On 02.04.21 19:20, Dieter Schön wrote:
> Hi Lloyd,
>
>
> I think os:command doesn't exist. If I try this, I get the same error:
>
> 7> os:gargantua(pdflatex --shell-escape tex/oblivious.tex).
>
> * 1:38: syntax error before: tex
>
>
> Have you tried
>
> > os:cmd("pdflatex --shell-escape tex/oblivious.tex").
>
> regards,
>
> Dieter
>
>
> On 02.04.21 19:05, Lloyd R. prentice wrote:
>> os:command(pdflatex --shell-escape tex/oblivious.tex).


More information about the erlang-questions mailing list