Mike Kupfer wrote: > >>>>> "Mike" == Mike Kupfer <[EMAIL PROTECTED]> writes: > > Roland> s/echo/print/ for ksh scripts (this is repeated many times in > Roland> the patch) > > Mike> This looks like a stylistic change that is contrary to the > Mike> existing code. Is there some other benefit to using print? Note > Mike> that the echo(1) man page says that "echo" is a built-in for ksh. > > One reason to use print occurred to me last night: error messages should > usually go to stderr, not stdout, and that's easier with print ("print > -u2") than with echo.
Erm... IMO it depends what is expected to be the "normal" output of the script ? For example should logging messages go to stdout and error messages to stderr ? It always depends on the application (and C++ made it worse by adding "stdlog" ... ;-/ ) ... ;-( > So I'll go ahead with the switch to print. What about the following functions: -- snip -- # fatal error: print message and exit function fatal_error { print -u 2 "${progname}: $@" exit 1 } function print_error { print -u 2 "${progname}: $@" } -- snip -- The first function would mark point where the script will always exit while the 2nd function only prints to stderr... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [EMAIL PROTECTED] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org