Sends a printer backend message to the user.
piomsg [ -u UserList ] [ -c MsgCatalog [ -s MsgSet ] -n MsgNumber ] [ -a MsgArg ] ... [ MsgText ]
The piomsg command either retrieves a printer backend message from a message catalog or sends a specified message text to one or more users. The piomsg command runs when a print job is executed. Typically, the piomsg command is used in printer colon files to send a message to the user submitting a print job while the print job is processed by the piobe command.
When the -c, -s, or -n flags are specified, the piomsg command retrieves a message from a message catalog. The command searches for the message in the directory specified in the NLSPATH environment variable. If the NLSPATH environment variable does not contain a directory path, the piomsg command searches the /usr/lib/lpd/pio/etc default directory. If no message is found in the /usr/lib/lpd/pio/etc directory, the command supplies the text specified in the MessageText variable. When the -c, -s, or -n flags are not specified, the piomsg command returns the value (if any) of the MessageText variable.
Each message is parsed for the %s or %n$s printf subroutine conversion specifications. The printf conversion specifications are replaced with supplied message strings, if any, before the message is sent to the user. The piomsg command processes escape sequences, such as, linefeed /n or horizontal tab /t, that are embedded in the message.
Item | Description |
---|---|
-a MsgArg | Specifies the message argument string. The value of the MsgArg variable is substituted into the message, if it contains the %s or %n$s printf subroutine conversion specifications. The -a flag can be specified up to 10 times to specify multiple arguments. If there are any errors while parsing conversion specifications, the original message is sent. |
-c MsgCatalog | Specifies the message catalog that contains the message to be retrieved. The -c flag must be specified with the -n flag. |
-n MsgNumber | Specifies the message number. The -n flag must be specified with the -c flag. |
-s MsgSet | Specifies an optional message set. The default value for the MsgSet variable is 1. The -s flag must be specified with both the -c and -n flags. |
-u UserList | Specifies the list of users who receive the message. The names of users or nodes in the UserList variable are separated by commas. To include a node name in the user list specify the @ character followed by a node name or address. If the -u flag is omitted, the message returns to the user who initiated the print job. |
piomsg -u joe,tom@foobar -c piobe.cat -n 100
piomsg -a "/usr/bin/troff" "The specified filter %s is not found\n"
piomsg -cxyz.cat -s2 -n5 "xyz.cat is not installed.\n"
Note: When the piomsg command cannot retrieve messages from the catalog specified with the NLSPATH environment variable or the default directory, the supplied message text is sent to the users.
Item | Description |
---|---|
/usr/lib/lpd/pio/etc/piomsg | Contains the piomsg command. |