# シェルスクリプト内で以下のように書くと
echo -n "Are you sure you want to exit the server? [y/n] > "
# 実行時
-n Are you sure you want to exit the server? [y/n] >
(´;ω;`)ウッ…
echoどこにあるの
$ whereis echo
/bin/echo
macの場合だけ/bin/echoを直接指定する
if [ `uname` = "Darwin" ]; then
/bin/echo -n "Are you sure you want to exit the server? [y/n] > "
else
echo -n "Are you sure you want to exit the server? [y/n] > "
fi
/bin/echo を指定すると何故かうまくいく
追記(20150530)
#!/bin/sh
を
#!/bin/bash
とすることでコードを統一できました。