• No results found

The l3sys-shell package System shell functions

N/A
N/A
Protected

Academic year: 2021

Share "The l3sys-shell package System shell functions"

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The l3sys-shell package

System shell functions

The L

A

TEX Project

Released 2021-08-27

This module provides platform-neutral interfaces to system shell commands. These functions can only access the shell if a document is proceeded using –shell-escape, which allows unrestricted access to command line functions.

In general, arbitrary documents should not be processed in this way, as shell escape could either accidentally or deliberately lead to unexpected side-effects. In that sense, they should be treated like any other arbitrary script: with caution. No attempt is made by the functions here to avoid injection of additional commands into the arguments.

With the above security caveats in mind, these functions are provided for authors where a workflow scripting within a LATEX document is preferable to using an external

script. The latter would of course also have the ability to run arbitrary code.

\sys_shell_cp:nn {⟨source ⟩} {⟨dest ⟩}

Copies the files specified in the ⟨source⟩ (which may include wildcards) to the ⟨dest⟩. The file paths should be specified using / as a path separator. Copying is not recursive: only files at the path level given are copied. If unrestricted shell escape is not enabled, no action is attempted.

\sys_shell_cp:nn New: 2018-07-28

\sys_shell_mkdir:n {⟨directory ⟩}

Creates the ⟨directory⟩, which should be specified using / as a path separator. If unre-stricted shell escape is not enabled, no action is attempted.

\sys_shell_mkdir:n New: 2018-07-27

\sys_shell_mv:nn {⟨old ⟩} {⟨new ⟩}

Moves the files from the ⟨old⟩ to ⟨new⟩ names/locations: the ⟨old⟩ names may include wildcards. In both arguments, / should be used as the path separator. If unrestricted shell escape is not enabled, no action is attempted.

\sys_shell_mv:nn New: 2018-07-28

\sys_shell_rm:n {⟨files ⟩}

Removes the ⟨files⟩ (which may include wildcards). The file path should be specified using / as a path separator. If unrestricted shell escape is not enabled, no action is attempted.

\sys_shell_rm:n New: 2018-07-27

\sys_shell_rmdir:n {⟨directory ⟩}

Removes the ⟨directory⟩, which should be specified using / as a path separator. If unre-stricted shell escape is not enabled, no action is attempted.

\sys_shell_rmdir:n New: 2018-07-27

E-mail: latex-team@latex-project.org

(2)

\sys_get_shell_pwd:N ⟨str var ⟩

Sets the ⟨str var ⟩ to the present working directory (the output of pwd on Unix or cd on Windows). Note that on Windows this will contain string backslash chars (\). If unrestricted shell escape is not enabled, no action is taken.

\sys_get_shell_pwd:N New: 2018-07-28

\sys_shell_split_ls:N {⟨glob ⟩} ⟨seq ⟩

Sets the ⟨seq var ⟩ to contain one entry per directory listing (equivalent to ls -1 or dir /b) as specified by the ⟨glob⟩: the entries are strings. If unrestricted shell is not enabled, no action is taken.

\sys_shell_split_ls:nN New: 2018-07-28

Index

The italic numbers denote the pages where the corresponding entry is described, numbers underlined point to the definition, all others indicate the places where it is used.

Referenties

GERELATEERDE DOCUMENTEN

Wij willen verder opmerken dat de groothandelsmarkt voor gas een internationale markt is, waarvan de ontwikkelingen op zijn minst regionaal (in Europees verband) en in toenemende

Voor deze categorie is niet per afvalstof van bijlage IX deel A van RICHTLIJN (EU) 2018/2001 nagegaan welke ZZS aanwezig kunnen zijn. ILT vindt het noodzakelijk dat de ZZS

Tijdens het openbaar onderzoek kunnen er standpunten, opmerkingen of bezwaren over de aanvraag worden ingediend bij het college van burgemeester en

The various functions in GF IT have to each take up internal in-depth subjective and objective data and process assessments at the various operational and knowledge levels in

From single commands to a shell script. Eth-0 zomer

In de hoofdredactie van het Nieuw Archief voor Wiskunde is een wisseling van de wacht gaande; Ferdinand Verhulst treedt op 1 april aanstaande af en wordt opgevolgd door Jan van

Wetenschappers die recent een collectie van oude schelpen bestudeerden, waren verrast omdat ze niet enkel geen bewijs voor evolutie in de specimens vonden, maar wel duidelijk

• De prijs per eenheid UMTS zal in Nederland lager worden dan in andere landen, omdat de lage opbrengst van de veiling leidt tot (relatief) lage constante kosten voor de