Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   m4.1p    ( 1 )

макропроцессор (macro processor)

Примеры (Examples)

If the file m4src contains the lines:

The value of `VER' is "VER". ifdef(`VER', ``VER'' is defined to be VER., VER is not defined.) ifelse(VER, 1, ``VER'' is `VER'.) ifelse(VER, 2, ``VER'' is `VER'., ``VER'' is not 2.) end

then the command

m4 m4src

or the command:

m4 -U VER m4src

produces the output:

The value of VER is "VER". VER is not defined.

VER is not 2. end

The command:

m4 -D VER m4src

produces the output:

The value of VER is "". VER is defined to be .

VER is not 2. end

The command:

m4 -D VER=1 m4src

produces the output:

The value of VER is "1". VER is defined to be 1. VER is 1. VER is not 2. end

The command:

m4 -D VER=2 m4src

produces the output:

The value of VER is "2". VER is defined to be 2.

VER is 2. end