A fun Linux shell script __linux

Source: Internet
Author: User

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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.