Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- if [ $# != 1 ] ; then
- echo wrong arg,please input one arg
- exit 1;
- fi
- if grep '^[[:digit:]]*$' <<< "$1";then
- echo "$1 is number."
- else
- echo "$1 is not number."
- fi
- if [ $1 -eq 1 ] ; then
- echo
- '
- /___/
- /
- | # # |
- @ |
- _|_ /
- / ______
- / _______ ___
- |_____ __/
- | __/
- | |
- /
- / ____
- | / |
- | | | |
- / | |
- __/ __/
- '
- elif [ $1 -gt 1 ] ; then
- echo
- '
- /___/
- /
- | # # |
- @ |
- _|_ /
- / ______
- / _______ ___
- |_____ __/
- | __/
- '
- i=1;
- while [ $i -le $1 ]
- do
- echo ' | |'
- i=`expr $i + 1`
- done
- echo ' /
- / ____
- | / |
- | | | |
- / | |
- __/ __/
- '
- else
- echo wrong number,please input the right one
- exit 1;
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement