From 6ffa2d6e728280fd26c5eec8da19a995b7624ef7 Mon Sep 17 00:00:00 2001 From: raydelto Date: Thu, 24 Dec 2015 23:30:51 -0400 Subject: [PATCH] Updating the year so that it will update automatically --- tree-EN.sh | 5 +++-- tree-ES.sh | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tree-EN.sh b/tree-EN.sh index 395f024..b4b139c 100755 --- a/tree-EN.sh +++ b/tree-EN.sh @@ -29,10 +29,11 @@ for ((i=1; i<=2; i++)) tput cup $((lin++)) $c echo 'mWm' } - +new_year=$(date +'%Y') +let new_year++ tput setaf 1; tput bold tput cup $lin $((c - 6)); echo MERRY CHRISTMAS -tput cup $((lin + 1)) $((c - 10)); echo And lots of CODE in 2015 +tput cup $((lin + 1)) $((c - 10)); echo And lots of CODE in $new_year let c++ k=1 diff --git a/tree-ES.sh b/tree-ES.sh index f67c103..9fd36be 100755 --- a/tree-ES.sh +++ b/tree-ES.sh @@ -29,10 +29,12 @@ for ((i=1; i<=2; i++)) tput cup $((lin++)) $c echo 'mWm' } - +ano_nuevo=$(date +'%Y') +let ano_nuevo++ tput setaf 1; tput bold tput cup $lin $((c - 6)); echo FELICES FIESTAS -tput cup $((lin + 1)) $((c - 9)); echo Y mucho CODIGO en 2015 + +tput cup $((lin + 1)) $((c - 9)); echo Y mucho CODIGO en $ano_nuevo let c++ k=1