in reply to Re^6: improve script
in thread improve script

Yes, except it's printing to STDERR not STDOUT.

Far more than you ever wanted to know about shell redirections

That's complicating things if sh has to capture the output.

No, only that way allows to cleanly separate usable data (STDOUT) from error messages (STDERR), without having to use heuristics (in other words: automated guessing).

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)