[GNU Manual] [POSIX requirement] [Linux man] [FreeBSD man]
Summary
true - Do nothing, successfully
Lines of code: 81
Principal syscall: None
Support syscalls: None
Options: 2 (help and version)
Spirtually linked to the true utility from Version 7 UNIX (1979)
Added to Shellutils in August 1999 [First version]
Number of revisions: 55 [Code Evolution]
The purpose of true is to force a guaranteed evaluation of true in the shell (thus in shell scripts)
Helpers:- None
- None
Setup
true (and false) macros EXIT_STATUS
to the respective return value. Thus, true
is the only possible exit to this utility
true only uses the default parsing options, which require no initialization
No additional variables are initialized in main()
Parsing
Verision and help are handled as with all utilities
Parsing cannot fail for true.
Execution
Execution returns EXIT_STATUS and cannot fail