Saturday, 28 September 2013

How to replace Linux Kernel error messages with my defined error messages?

How to replace Linux Kernel error messages with my defined error messages?

I have created a shell and when I give wrong number of arguments like
insufficient arguments to cp commands I receive the Linux shell error
message like what you will receive if you type cp fork.c as follows:
mysh> cp fork.c
cp: missing destination file operand after `fork.c'
Try `cp --help' for more information.
How can I bypass this error message and print my own error message like
Dude! this is an error ?

No comments:

Post a Comment