>  Oh, yes.  Definitely.
> Ok... lets start (this is mainly about Korn
> shell/POSIX scripts but some
> things apply to older shells like Bourne, too) ...
> 
> ---- SNIP ---- SNIP ----
> * Use "print" and not "echo" for output.
> "print" is guranteed to be a ksh builtin while "echo"
> may not be a
> builtin (causing extra |fork()|+|exec()|),
> additionally "echo" may not
> be portable (e.g. SysV vs. BSD "echo" differences)

And unless you want echo-style escapes, use

print -r -- "$whatever"

which will output $whatever without any modifications, for all possible
values of $whatever (except of course embedded null bytes, which only
perl handles nicely, I think).
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to