Poster of Linux kernelThe best gift for a Linux geek
MESSAGES

MESSAGES

Section: Misc. Reference Manual Pages (3) Updated: libbash messages Library Manual
Local index Up

BSD mandoc
 

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

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

 

printOK Bq Fa indent

Prints a standard [ OK ] message (green)  

printFAIL Bq Fa indent

Prints a standard [FAIL] message (red)  

printNA Bq Fa indent

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

 

printATTN Bq Fa indent

Prints a standard [ATTN] message (yellow)  

printWAIT Bq Fa indent

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

An Hai Zaar Aq haizaar@haizaar.com An Gil Ran Aq gil@ran4.net  

SEE ALSO

ldbash(1), libbash(1)


 

Index

NAME
SYNOPSIS
DESCRIPTION
General
indent
FUNCTIONS DESCRIPTIONS
Cm printOK Bq Ns Fa indent Ns Li
Cm printFAIL Bq Ns Fa indent Ns Li
Cm printNA Bq Ns Fa indent Ns Li
Cm printATTN Bq Ns Fa indent Ns Li
Cm printWAIT Bq Ns Fa indent Ns Li
EXAMPLES
AUTHORS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:50:11 GMT, April 16, 2011