Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

A (presumbly pretty simple) SafeChars plugin request...

May
855
0
I would like to do a "SafeEcho", but to standard error and not to standard ouput. If there's some way of doing this using "redirection redirection" (i.e. "1>&2") I haven't been able to get it to work. Maybe there's a way to do the previous that I haven't found and the following is unnecessary, but I think it would be very nice to have "SafeEchoErr" and "SafeEchoSErr" commands. (And I tend to think that if redirecting the output of the "Echo" command to standard error easy, there would be no need for "EchoErr" and "EchoSErr". But I could be wrong....)
 
I would like to do a "SafeEcho", but to standard error and not to standard ouput. If there's some way of doing this using "redirection redirection" (i.e. "1>&2") I haven't been able to get it to work. Maybe there's a way to do the previous that I haven't found and the following is unnecessary, but I think it would be very nice to have "SafeEchoErr" and "SafeEchoSErr" commands. (And I tend to think that if redirecting the output of the "Echo" command to standard error easy, there would be no need for "EchoErr" and "EchoSErr". But I could be wrong....)

1>&2 works for me, sending the output text to stderr.

Mind you, it doesn't get colored as I would expect -- the ErrorColors specified in my .INI file don't appear. But that's true for internal commands as well; ECHO TEST 1>&2 sends text to standard error, but doesn't color it. I don't know why that is, but coloring stdout probably involves adding code to every place that prints text to stdout, and catching this kind of redirection may be difficult or impractical for Rex. I just don't know.
 
1>&2 works for me, sending the output text to stderr.

Mind you, it doesn't get colored as I would expect -- the ErrorColors specified in my .INI file don't appear.
Thank you, Charles; I don't think I need to tell you that you are correct. (Maybe the wrong colors were misleading me yesterday, but for some reason I at least thought I was correct before making the posting. My oft-mentioned memory issues could have something to do with it...) Although the "wrong color" issue might make it worthwhile to implement "SafeEchoErr" and "SafeEchoSErr" functions.

Notice that I am avoiding bold and italic fonts in theses postings because I've had some complaints about them in the past, but it is hard (and the urge to bold the previous "is" was almost overwhelming... ; > ) >
 
Back
Top