[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

true or false Command

Purpose

Returns an exit value of zero (true) or a nonzero exit value (false).

Syntax

true

false

Description

The true command returns a zero exit value. The false command returns a nonzero exit value. These commands are most often used as part of a shell script.

Examples

To construct a loop that displays the date and time once each minute, use the following code in a shell script:

while true
do
   date
   sleep 60
done

Related Information

Creating and Running a Shell Script in AIX Version 4.3 System User's Guide: Operating System and Devices provides information on creating and executing shell procedures.

Commands Overview in AIX Version 4.3 System User's Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]