UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: fmtChapter 2
UNIX Commands
Next: Reference: fold
 

fmtmsg

fmtmsg [options] text

Print text as part of a formatted error message on stderr (or on system console). text must be quoted as a single argument. fmtmsg is used in shell scripts to print messages in a standard format. Messages display as follows:

label:	severity:		text
TO FIX:	action		tag

You can define the MSGVERB variable to select which parts of the message to print. Each part is described with the options below.

Options

-a action

A string describing the first action to take in recovering the error. The string "TO FIX:" precedes the action string.

-c source

The source of the problem, where source is one of hard (hardware), soft (software), or firm (firmware).

-l label

Identify the message source with a text label, often of the form file:command.

-s severity

How serious the condition is. severity is one of halt, error, warn, or info.

-t tag

Another string identifier for the message.

-u types

Classify the message as one or more types (separated by commas). types can be one of the keywords appl, util, or opsys (meaning that the problem comes respectively from an application, utility, or the kernel), either of the keywords recov or nrecov (application will or won't recover), print (message displays on stderr), and console (message displays on system console).


Previous: Reference: fmtUNIX in a Nutshell: System V EditionNext: Reference: fold
Reference: fmtBook IndexReference: fold

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System