$ rustc output2.rs
$ ./output2 
ファイルに書き込む文字列を入力してください> 
Hello world. My name is Alice.
ファイルへの書き込みが終了しました。