Created
May 28, 2014 12:52
-
-
Save furushchev/8b6fcd40431b03dcfb7d to your computer and use it in GitHub Desktop.
時間のかかるコマンドの後に知らせてくれるコマンド
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat <<EOF >> ~/.bashrc | |
function alert(){ | |
local SAY="say -v Otoya" # use "say -v Kyoko" if you like female | |
if [ \$# -ge 1 ]; then | |
\$@ && \$SAY "\$@ が おわったでー。" | |
else | |
\$SAY "なにすんねん!" | |
fi | |
} | |
EOF | |
exec -l $SHELL | |
echo "usage: bash alert_after_long_command.bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使い方