DOKK / manpages / debian 10 / libbash / messages.3.en
MESSAGES(3) 3 (libbash messages library manual) MESSAGES(3)

messageslibbash library that implements a set of functions to print standard status messages

[indent]
[indent]
[indent]
[indent]
[indent]

messages is a collection of functions to print standard status messages - those [ OK ] and [FAIL] messages you see during Linux boot process.

The function list:

Prints a standard [ OK ] message (green)
Prints a standard [FAIL] message (red)
Prints a standard [ N/A] message (yellow)
Prints a standard [ATTN] message (yellow)
Prints a standard [WAIT] message (yellow)

Detailed interface description follows.

Column to move to before printing.

Default indent is calculated as TTY_WIDTH-10. If current tty width can not be determined (for example, in case of serial console), it defaults to 80, so default indent is 80-10=10

Prints a standard [ OK ] message (green)

Prints a standard [FAIL] message (red)

Prints a standard [ N/A] message (yellow)

Prints a standard [ATTN] message (yellow)

Prints a standard [WAIT] message (yellow)

Run a program named MyProg, and report it's success or failure:

echo -n 'Running MyProg...'
printWAIT
if MyProg ; then
	printOK
else
	printFAIL
fi

Hai Zaar ⟨haizaar@haizaar.com⟩
Gil Ran ⟨gil@ran4.net⟩

ldbash(1), libbash(1)

Linux