home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX in a Nutshell: System V Edition

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

if



if

 (

condition

)
      

command


[

else

]
      [

command

]

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: gsub UNIX in a Nutshell: System V Edition Next: Reference: index
Reference: gsub Book Index Reference: index

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