Created
January 1, 2012 07:05
-
-
Save yumsuresht/1546571 to your computer and use it in GitHub Desktop.
New year 2012 shell script
This file contains hidden or 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 | |
| if [ $# -eq 1 ] | |
| then | |
| fname=$1 | |
| else | |
| echo "Invalid Arguments" | |
| echo "Usage: newyear.sh filename" | |
| exit | |
| fi | |
| clear | |
| i=0 | |
| while read line | |
| do | |
| if [ $i -lt 8 ] ; then | |
| COLOR1="\e[1;31;40m" ; COLOR2="\e[0m" | |
| elif [ $i -gt 8 -a $i -lt 17 ] ; then | |
| COLOR1="\e[1;37;40m" ; COLOR2="\e[0m" | |
| elif [ $i -gt 17 -a $i -lt 26 ] ; then | |
| COLOR1="\e[1;32;40;5m" ; COLOR2="\e[0m" | |
| fi | |
| newline=`echo "$line" | tr '69' ' @' ` | |
| printf "$COLOR1$newline $COLOR2" | |
| let i++ | |
| sleep 0.1 | |
| done < $fname | |
| read | |
This file contains hidden or 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
| 6666666666996666699666666666966666666669999999996699999999966996666669966666666 | |
| 6666666666996666699666666669996666666669999999996699999999966699666699666666666 | |
| 6666666666996666699666666699669966666669966666996699666669966669966996666666666 | |
| 6666666666999999999666666996666996666669999999996699999999966666999966666666666 | |
| 6666666666999999999666669999999999666669999999996699999999966666699666666666666 | |
| 6666666666996666699666699999999999966669966666666699666666666666699666666666666 | |
| 6666666666996666699666996666666666996669966666666699666666666666699666666666666 | |
| 6666666666996666699669966666666666699669966666666699666666666666699666666666666 | |
| 6666666666666666666666666666666666666666666666666666666666666666666666666666666 | |
| 9966666996699999999669966666996666699666666996999999996666666696666666699999999 | |
| 9996666996699999999669966666996666669966669966999999996666666999666666699999999 | |
| 9999666996699666666669966666996666666996699666996666666666669969966666699666699 | |
| 9969966996699999999669966966996666666699996666999999996666699666996666699999999 | |
| 9966996996699999999669969996996666666669966666999999996666999999999666699999999 | |
| 9966699996699666666669999699996666666669966666996666666669999999999966699699666 | |
| 9966669996699999999669996669996666666669966666999999996699666666666996699669966 | |
| 9966666996699999999669966666996666666669966666999999996996666666666699699666699 | |
| 6666666666666666666666666666666666666666666666666666666666666666666666666666666 | |
| 6666666666666666666666699999999666999699999666999666699999999666666666666666666 | |
| 6666666666666666666666699999999666996666699666699666669999999966666666666666666 | |
| 6666666666666666666666666666996666999666699666699666666666699666666666666666666 | |
| 6666666666666666666666666669966666996696699666699666666666996666666666666666666 | |
| 6666666666666666666666666699666666996669699666699666666669966666666666666666666 | |
| 6666666666666666666666669966666666996666999666699666666996666666666666666666666 | |
| 6666666666666666666666699999999666996666699666699666669999999966666666666666666 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run in Terminal [ts89@dennis ~]$ sh newyear.sh year2012.txt