There is an unapproved draft technical report titled
Conflicts between ISO/IEC 9945 (POSIX) and the Linux Standard Base that may help. No Linux implementation I've ever heard of conformed to the LSB and (unless you have /usr/xpg4/bin before /usr/bin in your setting of $PATH) many of the utilities in your search path might not conform to POSIX requirements on your Solaris system. And, Linux systems, Solaris systems, and the standards have all changed since this October 2004 report. But, despite all of these caveats, it may give you some helpful hints on possible porting problems.
PS The standards do explicitly define the behavior of the
echo utility. Unfortunately, the standards allow either UNIX System V
echo behavior or BSD
echo behavior and GNU
echo ignores the standards and does not match either UNIX System V or BSD
echo behavior. As verdepollo suggested, use
printf instead of
echo if the first argument to
echo could start with a minus sign or if any argument to
echo could contain a backslash character.