UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: gsubChapter 11
The Awk Scripting Language
Next: Reference: index


if (condition)

If condition is true, do command(s), otherwise do command in else clause. Condition can be an expression using any of the relational operators <, <=, ==, !=, >=, or >, as well as the pattern-matching operator ~ (e.g., "if ($1 ~ /[Aa].*/)"). A series of commands must be put within braces.

Previous: Reference: gsubUNIX in a Nutshell: System V EditionNext: Reference: index
Reference: gsubBook IndexReference: index

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