A fun Linux shell script, the basic idea is to loop the call Cowsay
The effect is as follows
------------------------------------------------------------------------Gorgeous split Line------------------------------------------ ------------------------------------
(partial picture)
------------------------------------------------------------------------Gorgeous split Line------------------------------------------ ------------------------------------
The key code is as follows
######################################################################### # File Name: mycowsay.sh # Author:huangjinqiang # Email:ligelaige@gmail.com # Created time:2014 year April 28 Monday 18:41 33 seconds ########################################### ############################## #!/bin/bash Cmd=cowsay $CMD "Hello, jinqiang!" if [$-ne 0];then ec Ho "Please enter following command to install" echo "sudo apt-get install $CMD" echo "or" echo "sudo aptitude install $CMD" exit fi dir=/usr/share/cowsay/cows/for file Name in ' ls $dir ' do if [$#-eq 0];then read key & Nbsp;fi if ["$key" = ""];then key= "Hello, jinqiang!" &nbs P fi name=${filename% ". Cow"} $CMD-F $name $key done
Code Download: Http://pan.baidu.com/s/1eQ9pKzC