1COLON(1P) POSIX Programmer's Manual COLON(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 colon — null utility
13
15 : [argument...]
16
18 This utility shall only expand command arguments. It is used when a
19 command is needed, as in the then condition of an if command, but noth‐
20 ing is to be done by the command.
21
23 None.
24
26 See the DESCRIPTION.
27
29 Not used.
30
32 None.
33
35 None.
36
38 Default.
39
41 Not used.
42
44 The standard error shall be used only for diagnostic messages.
45
47 None.
48
50 None.
51
53 Zero.
54
56 Default.
57
58 The following sections are informative.
59
61 None.
62
64 : ${X=abc}
65 if false
66 then :
67 else echo $X
68 fi
69 abc
70
71 As with any of the special built-ins, the null utility can also have
72 variable assignments and redirections associated with it, such as:
73
74
75 x=y : > z
76
77 which sets variable x to the value y (so that it persists after the
78 null utility completes) and creates or truncates file z.
79
81 None.
82
84 None.
85
87 Section 2.14, Special Built-In Utilities
88
90 Portions of this text are reprinted and reproduced in electronic form
91 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
92 table Operating System Interface (POSIX), The Open Group Base Specifi‐
93 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
94 Electrical and Electronics Engineers, Inc and The Open Group. In the
95 event of any discrepancy between this version and the original IEEE and
96 The Open Group Standard, the original IEEE and The Open Group Standard
97 is the referee document. The original Standard can be obtained online
98 at http://www.opengroup.org/unix/online.html .
99
100 Any typographical or formatting errors that appear in this page are
101 most likely to have been introduced during the conversion of the source
102 files to man page format. To report such errors, see https://www.ker‐
103 nel.org/doc/man-pages/reporting_bugs.html .
104
105
106
107IEEE/The Open Group 2017 COLON(1P)