How to print warning messages on console when we use exec command?

I am having script in which for logging I am using exec command. I am calling another script/program through this script which is designed for another user id.

So, After running script it is giving warning message as "This program has been designed for another user id. Please press Enter to continue."
After went through log I understood to finish execution we need to hit enter one more time. But everytime this is not possible.

I want to print this warning message on console so whoever is running script can read the warning message.

Help is much appreciated.:slight_smile:

Thanks,
Vikram.

Try directing the message to /dev/tty.

Thanks For quick reply Scott :b:

will it work if I am calling program as follows,

$service_script_Path/stopservers > /dev/tty 

Thanks,
Vikram.

No, since any exec or redirection in "stopservers" will override it.

Thanks Scott!

but exec or redirection is not in stopservers program...
let me tell you..
I have one script say abc.ksh in which I am using exec to log the details...
in abc.ksh I am calling /stopservers program which is designed for another user. So, it's throwing warning message as "This program has been designed for another user. Press Enter to continue"

I want to print this error message on console.. So this will work right?

Thanks!

Oh, in that case, it should be OK :slight_smile:

Thanks Scott! :b:It works..

Cheers !!!