---
name: "messages"
section: "3"
platform: "linux"
package: "libbash"
version: "0.9.11-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/messages/3"
---

# messages(3)

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

## NAME

**messages** – libbash library that implements a set of functions to print standard status messages

## SYNOPSIS

- **printOK**

  \[indent\]

- **printFAIL**

  \[indent\]

- **printNA**

  \[indent\]

- **printATTN**

  \[indent\]

- **printWAIT**

  \[indent\]

## DESCRIPTION

### General

**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:

- **printOK**

  Prints a standard \[ OK \] message (green)

- **printFAIL**

  Prints a standard \[FAIL\] message (red)

- **printNA**

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

- **printATTN**

  Prints a standard \[ATTN\] message (yellow)

- **printWAIT**

  Prints a standard \[WAIT\] message (yellow)

Detailed interface description follows.

### indent

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

## FUNCTIONS DESCRIPTIONS

### Cm printOK Bq Ns Fa indent Ns Li

Prints a standard \[ OK \] message (green)

### Cm printFAIL Bq Ns Fa indent Ns Li

Prints a standard \[FAIL\] message (red)

### Cm printNA Bq Ns Fa indent Ns Li

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

### Cm printATTN Bq Ns Fa indent Ns Li

Prints a standard \[ATTN\] message (yellow)

### Cm printWAIT Bq Ns Fa indent Ns Li

Prints a standard \[WAIT\] message (yellow)

## EXAMPLES

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

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

## AUTHORS

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

## SEE ALSO

[ldbash(1)](/ldbash/1.md), libbash(1)
