Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
true
Return true value (POSIX)
Syntax:
true
Options:
None.
Description:
The true utility does nothing and exits immediately with a zero exit code.
The true utility is typically used in shell scripts. One common application is to create an infinite loop, as in:
while true
do
myprogram
sleep 300
done
which runs myprogram every five minutes (300 seconds) until the shell script is interrupted.
Exit status:
The true utility always exits with a value of zero.
See also:
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Next]](../next.gif)