在我的 bash 脚本中,我使用了很多echo "......." | wall
行来在事件通知发生时广播它们。
但是,控制台上的结果输出变得笨拙:
Broadcast Message from root@BIGFOOT
(somewhere) at 16:07 ...
Photo backup started on Mon Oct 7 16:07:55 PHT 2013
Broadcast Message from root@BIGFOOT
(somewhere) at 16:08 ...
Photo backup successfully finished on Mon Oct 7 16:08:05 PHT 2013
Broadcast Message from root@BIGFOOT
(somewhere) at 16:08 ...
You may now unplug the Photo Backup HDD.
相反,我们希望它看起来更像以下内容,
Broadcast Message from root@BIGFOOT
(somewhere) at 16:07 ...
Photo backup started on Mon Oct 7 16:07:55 PHT 2013
Photo backup successfully finished on Mon Oct 7 16:08:05 PHT 2013
You may now unplug the Photo Backup HDD.
这有点像在开放式写聊天会话中出现的内容。
这可能吗?如果是这样,我应该如何修改我的脚本以实现所需的控制台输出?