CDSoft / pp

PP - Generic preprocessor (with pandoc in mind) - macros, literate programming, diagrams, scripts...

Home Page:http://cdelord.fr/pp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Execute shell command without inserting its stdout/stderr?

bpj opened this issue · comments

Is there a way to run a shell command without inserting its output into the pp output? I need to ensure that a certain PDF is updated before inserting it as an image. Nothing make can't handle but it would be nice if it could be done inside the document source.

There are several ways to do this.

  • you can redirect stdout to /dev/null: \sh(command > /dev/null). pp only captures stdout.
  • you can use the macro \quiet which evaluates its argument but inserts nothing in the document: \quiet(\sh(command))

you can use the macro \quiet which evaluates its argument but inserts nothing in the document: \quiet(\sh(command))

Yes of course. Stupid of me to miss that!