2009-10-11 ファイルの内容を変数に読み込む UNIX/Linux ファイルの内容を変数に読み込むには catコマンドの出力をコマンド置き換えする #!/bin/sh #file_to_var.sh msg=`cat file.out` echo "$msg"