Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

bash | コマンドの実行完了後にビープ音を鳴らしたい場合

概要

コマンドの実行完了後にビープ音を鳴らしたい場合

内容

コマンドの実行完了後にビープ音を鳴らしたい場合

anycommand;echo $'\a'

このままだと使いにくいのでエイリアスを追加

cat <<EOS>>~/.bash_profile
alias beep="echo $'\a'"
EOS

source ~/.bash_profile

使用例

sleep 1;beep;sleep 1;beep