WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Happy New Year :)  (Read 2650 times)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Happy New Year :)
« on: December 31, 2011, 08:05:46 AM »
Happy new year Every ONE !!  ;D
55min to 2012 from Brisbane, Australia
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11659
Re: Happy New Year :)
« Reply #1 on: December 31, 2011, 08:26:45 AM »
Happy new year to all.

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: Happy New Year :)
« Reply #2 on: December 31, 2011, 03:39:00 PM »
Happy New Year! Although I'm near Honolulu so there's 13+ hours to go...

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: Happy New Year :)
« Reply #3 on: December 31, 2011, 05:24:19 PM »
+1 on the "Happy New Year!"
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Happy New Year :)
« Reply #4 on: December 31, 2011, 06:45:46 PM »
Good Luck and a Happy New Year to All

Only 8+ hours and counting...

Code: [Select]
#!/bin/bash
#my simple countdown
#
. /etc/init.d/tc-functions
num=28800
while (( num > 0 ))
do
clear
echo -n "${CYAN}Countdown to 2012: ${GREEN}$num${NORMAL}"
sleep 1
let num-=1
clear
done

echo "Hoora!!"
« Last Edit: December 31, 2011, 06:51:56 PM by coreplayer2 »

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: Happy New Year :)
« Reply #5 on: January 01, 2012, 01:48:34 PM »
Cogratulations coreplayer2.  You are the first one to teach me something cool this year.  I have so often wished for the -= operator but, since I typically don't use "let", I never new it was there.  I guess one of the long term hazards of BASIC-as-a-first-language is the deeply ingrained notion that "VAR=VALUE" is exactly the same as "let VAR=VALUE", which clearly is not the case in shell scripting.

Code: [Select]
num=`expr ${NUM} \- 1`

Code: [Select]
let num-=1

Thanks for demonstrating such a useful tool.
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Happy New Year :)
« Reply #6 on: January 04, 2012, 07:11:22 PM »
Ha ha!  Your welcome, glad it was enlightening.  Am trying to learn bash as fast as possible, btw this "let" which I found quite interesting, was able to use on a project I'm currently working on.  So whilst it was still fresh in mind wrote a countdown the new year.
« Last Edit: January 04, 2012, 09:40:06 PM by coreplayer2 »