Полезная информация

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: .ieChapter 12
Nroff and Troff
Next: Reference: .ig


.if [!]condition anything

If condition is true, do anything. The presence of an ! negates the condition. If anything runs over more than one line, it can be delimited by \{ and \}.



True if the page number is odd.


True if the page number is even.


True if the processor is nroff.


True if the processor is troff.


True if str1 is identical to str2. Often used to test the value of arguments passed to a macro.


True if the value of expression expr is greater than zero.


Expressions typically contain number register interpolations, and can use any of the following operators:

+ -

Addition, subtraction.

/ *

Multiplication, division.



> <

Greater than, less than.

>= <=

Greater than or equal, less than or equal.

= ==



Logical AND.


Logical OR.


.if t .nr PD 0.5v  \" Set spacing between ms paragraphs
.if !"\\$2"" \{\ \" If the arg 2 is non null, print arg 3 in bold

Previous: Reference: .ieUNIX in a Nutshell: System V EditionNext: Reference: .ig
Reference: .ieBook IndexReference: .ig

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System