EnglishFrenchSpanish

OnWorks favicon

subst - Online in the Cloud

Run subst in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command subst that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


subst - substitute definitions into file(s)

SYNOPSIS


subst [ -e editor ] -f substitutions victim ...

DESCRIPTION


Subst makes substitutions into files, in a way that is suitable for customizing software
to local conditions. Each victim file is altered according to the contents of the
substitutions file.

The substitutions file contains one line per substitution. A line consists of two fields
separated by one or more tabs. The first field is the name of the substitution, the
second is the value. Neither should contain the character `#', and use of text-editor
metacharacters like `&' and `\' is also unwise; the name in particular is best restricted
to be alphanumeric. A line starting with `#' is a comment and is ignored.

In the victims, each line on which a substitution is to be made (a target line) must be
preceded by a prototype line. The prototype line should be delimited in such a way that
it will be taken as a comment by whatever program processes the file later. The prototype
line must contain a ``prototype'' of the target line bracketed by `=()<' and `>()=';
everything else on the prototype line is ignored. Subst extracts the prototype, changes
all instances of substitution names bracketed by `@<' and `>@' to their values, and then
replaces the target line with the result.

OPTIONS


-e Substitutions are done using the sed(1) editor, which must be found in either the
/bin or /usr/bin directories. To specify a different executable, use the ``-e''
flag.

EXAMPLE


If the substitutions file is

FIRST 111
SECOND 222

and the victim file is

x = 2;
/* =()<y = @<FIRST>@ + @<SECOND>@;>()= */
y = 88 + 99;
z = 5;

then ``subst -f substitutions victim'' changes victim to:

x = 2;
/* =()<y = @<FIRST>@ + @<SECOND>@;>()= */
y = 111 + 222;
z = 5;

Use subst online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    formkiq-core
    formkiq-core
    FormKiQ Core is an Open Source Document
    Management System (DMS), available to
    run as a headless software or with a
    web-based client, deployed to your
    Amazon We...
    Download formkiq-core
  • 2
    Blackfriday
    Blackfriday
    Blackfriday is a Markdown processor
    implemented in Go. It is paranoid about
    its input (so you can safely feed it
    user-supplied data), it is fast, it
    supports c...
    Download Blackfriday
  • 3
    QNAP NAS GPL Source
    QNAP NAS GPL Source
    GPL source for QNAP Turbo NAS.
    Audience: Developers. User interface:
    Web-based. Programming Language: C,
    Java. Categories:System, Storage,
    Operating System Ker...
    Download QNAP NAS GPL Source
  • 4
    deep-clean
    deep-clean
    A Kotlin script that nukes all build
    caches from Gradle/Android projects.
    Useful when Gradle or the IDE let you
    down. The script has been tested on
    macOS, but ...
    Download deep-clean
  • 5
    Eclipse Checkstyle Plug-in
    Eclipse Checkstyle Plug-in
    The Eclipse Checkstyle plug-in
    integrates the Checkstyle Java code
    auditor into the Eclipse IDE. The
    plug-in provides real-time feedback to
    the user about viol...
    Download Eclipse Checkstyle Plug-in
  • 6
    AstrOrzPlayer
    AstrOrzPlayer
    AstrOrz Player is a free media player
    software, part based on WMP and VLC. The
    player is in a minimalist style, with
    more than ten theme colors, and can also
    b...
    Download AstrOrzPlayer
  • More »

Linux commands

Ad