PRINTATTN(3)

๐Ÿ“ฆ
version 0.9.11 ยท 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

๐Ÿ’ฌ messages(3) โ€” the libbash glow-up your terminal deserves

okay bestie, so messages(3) is a libbash library (that's the LOCAL one, section 3, she's untitled but we love her anyway ๐Ÿ’…) and she implements a whole set of functions to print standard status messages. no cap.


โœจ 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 literally see during the Linux boot process. it's giving โœจritualโœจ

The function list, periodt:

  • 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, bestie. keep reading ๐Ÿ‘‘

๐Ÿงš 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 ๐Ÿงฎ

lowkey iconic that she just does the math for you. she's the main character fr fr

๐Ÿ‘‘ FUNCTIONS DESCRIPTIONS ๐Ÿ‘‘

๐Ÿ’š printOK [indent]

Prints a standard [ OK ] message (green). slay. you ate. ๐Ÿ’š

โค๏ธ printFAIL [indent]

Prints a standard [FAIL] message (red). it happens, we move ๐Ÿ˜ญ

๐Ÿ’› printNA [indent]

Prints a standard [ N/A] message (yellow). not applicable bestie, not our problem โœจ

๐Ÿ’› printATTN [indent]

Prints a standard [ATTN] message (yellow). pay attention, this one's talking to you ๐Ÿ™ˆ

๐Ÿ’› printWAIT [indent]

Prints a standard [WAIT] message (yellow). hold on babe, she's loading ๐ŸŒˆ


๐ŸŒŸ 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

look at that control flow. the drama. the suspense. printWAIT then boom, printOK or printFAIL. cinema. ๐Ÿ“


๐Ÿซถ AUTHORS ๐Ÿซถ

  • Hai Zaar <haizaar@haizaar.com>
  • Gil Ran <gil@ran4.net>

(the two legends who made the boot screen cute, we stan ๐ŸŽ€)


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ


and that's the whole vibe check, bestie ๐Ÿ’– this page came from Linux, version UNDATED โ€” so she's timeless, she's ethereal, she's giving forever-girl ๐Ÿฆ‹โญ go forth and print your status messages, you absolute icon ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from