echo で改行しないようにするには

基本的に -n オプションでよい。でも Solaris でシェルだと \c を付けないとダメ。

echo test
echo -n test
echo test\c

クロスプラットフォームで動かすスクリプトは printf の方が良さそう。

printf "test\n"
printf test