The msgtool program relies on command line arguments to determine its behavior. This is what makes it especially useful when called from a shell script. All of the capabilities are provided, from creating, sending, and retrieving, to changing the permissions and finally removing a queue. Currently, it uses a character array for data, allowing you to send textual messages. Changing it to facilitate additional data types is left as an exercise to the reader.