コマンド実行結果の改行を削除させずに標準出力する published: 2016.08.21 標準出力時にコマンドの実行結果を格納した変数をダブルクォートで括る。hoge=`ls -l` echo "$hoge"