In the post " " we created 2017 on the terminal. Here is a small extention to the same, to make it appear on character at a time giving it the effect of an animation.
#!/bin/bash #create 2017 on terminal using any user specified character str_dwn() { rows=$1 s_start=$2 char=$4 str_st_row=$3 rows_end=$((str_st_row+rows)) for((i=str_st_row;i<rows_end;i++)) do tput cup $i $s_start printf "$char " done echo"" } backslash() { b_st_row=$1 b_st_cols=$2 b_char=$3 b_r_end=$((b_st_row + 5 )) for((p=b_st_row;p<b_r_end;p++)) do tput setaf $4 tput cup $p $b_st_cols printf "$b_char " ((b_st_cols++)) done echo"" } forward() { f_st_row=$1 f_st_cols=$2 f_len=$3 f_char=$4 f_r_end=$((f_st_row + $f_len)) for((i=f_st_row;i<f_r_end;i++)) do tput cup $i $f_st_cols printf "$f_char " ((f_st_cols--)) done echo"" } horizontal() { hrow=$2 hstart=$1 hcols=$3 char=$4 end=$((hstart + hcols)) for((i=hstart;i<=end;i++)) do tput cup $hrow $i printf "$char" done echo"" } gen_rand() { num1=$1 if [ $num1 -eq 0 ] then temp=$(($RANDOM % 2)) rand=$((temp + 2)) else temp=$(($RANDOM % 5)) rand=$((temp + num1)) fi } two() { hstart_2=$1 hrow_be=$2 hcols_2=$3 char=$4 color=$5 set_color horizontal $hstart_2 $hrow_be $hcols_2 "$char" st_row_2=$((hrow_be+1)) f_st_cols_2=$((hstart_2+hcols_2)) forward $st_row_2 $f_st_cols_2 5 "$char" $color hstart_2_lo=$start hrow_2_lo=$((hrow_be+6)) hcols_2_lo=5 horizontal $hstart_2_lo $hrow_2_lo $hcols_2_lo "$char" } zero() { set_color hstart_0=$((f_st_cols_2 +4)) hcols_0=5 horizontal $hstart_0 $hrow_be $hcols_0 "$char" str_dwn_col_0=$hstart_0 str_dwn_row_0=$((hrow_be + 1)) str_dwn 6 $str_dwn_col_0 $str_dwn_row_0 "$char" hstart_0_lo=$((f_st_cols_2 +4)) hcols_0_lo=6 hrow_0_lo=$((hrow_be+6)) horizontal $hstart_0 $hrow_0_lo $hcols_0 "$char" str_dwn_col_rig_0=$((hstart_0 +5)) str_dwn_row_rig_0=$((hrow_be + 1)) str_dwn 6 $str_dwn_col_rig_0 $str_dwn_row_rig_0 "$char" } one() { set_color str_dwn_col_1=$((str_dwn_col_rig_0 + 4)) str_dwn_row_1=$((hrow_be)) str_dwn 7 $str_dwn_col_1 $str_dwn_row_1 "$char" } seven() { set_color hstart_7_top=$((str_dwn_col_1 +4)) hcols_7_top=4 hrow_7_top=$((hrow_be)) horizontal $hstart_7_top $hrow_7_top $hcols_7_top "$char" hstart_7_mid=$((str_dwn_col_1+8)) hcols_7_mid=4 hrow_7_mid=$((hrow_be)) forward $hrow_7_mid $hstart_7_mid 7 "$char" $color } set_color(){ color=$RANDOM color=$((color%6)) tput setaf $color } cols=`tput cols` mid=$((cols/2)) start=$((mid-16)) echo "What character do you want to use" read char tput clear rows=5 begin_row=2 num_cols=6 two $start $begin_row $num_cols "$char" $color; sleep 2 zero sleep 2 one sleep 2 seven sleep 2 ; tput setaf 0 tput cup 9 0Save the script as animated_2017.sh and run it in the terminal
bash animated_2017.shYou should see 2017 appear one character at a time on the terminal.