Last active
November 11, 2015 11:19
-
-
Save ls0f/6ca306a61e9a6bd83ec9 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 | |
welcome=( | |
'佛祖保佑 永无BUG' | |
'你好啊单身狗' | |
'壮士,干了这碗鸡汤!' | |
'上线了吗?' | |
'法海,你的头发怎么那么长!' | |
'少壮不努力,长大做挨踢.' | |
'佛祖,我好烦.' | |
) | |
length=${#welcome[@]} | |
index=$(($RANDOM%$length)) | |
cat ~/.buddha.txt; | |
echo; | |
space=$(( ( 50 - ${#welcome[$index]} ) / 2 )); | |
if [[ $space -gt 0 ]];then | |
for i in `seq $space`; | |
do | |
a="$a "; | |
done | |
a="${a}${welcome[$index]}"; | |
echo -e "\x1B[32m${a}\x1B[0m"; | |
else | |
echo -e "\x1B[32m${welcome[$index]}\x1B[0m"; | |
fi | |
echo; |
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
_oo0oo_ | |
088888880 | |
88" . "88 | |
(| -_- |) | |
0\ = /0 | |
___/'---'\___ | |
.' \\| |// '. | |
/ \\||| : |||// \ | |
/_ ||||| -:- |||||- \ | |
| | \\\ - /// | | | |
| \_| ''\---/'' |_/ | | |
\ .-\__ '-' __/-. / | |
___'. .' /--.--\ '. .'___ | |
."" '< '.___\_<|>_/___.' >' "". | |
| | : '- \'.;'\ _ /';.'/ - ' : | | | |
\ \ '_. \_ __\ /__ _/ .-' / / | |
====='-.____'.___ \_____/___.-'____.-'===== | |
'=---=' |
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 | |
wget https://gist.githubusercontent.com/lovedboy/6ca306a61e9a6bd83ec9/raw/buddha.txt -O ~/.buddha.txt -o /dev/null | |
wget https://gist.githubusercontent.com/lovedboy/6ca306a61e9a6bd83ec9/raw/buddha.sh -O ~/.buddha.sh -o /dev/null && chmod +x ~/.buddha.sh | |
[ -f ~/.buddha.txt ] && [ -f ~/.buddha.sh ] && echo "download success.\nrun follow cmd.\necho \"~/.buddha.sh\" >> your shell.rc file" || echo "install fail." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment