Hello World Day

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    Hello World Day

    Hi everybody!
    As was suggested here, today should be Hello World Day! So, here's my Hello World Program in bash script:
    Code:
    #!/bin/bash
    i=0;
    function hello {
    	case $i in
    	0)
    		echo 'H'
    		i=`expr $i + 1`;
    		hello
    		;;
    	1)
    		echo 'e'
    		i=`expr $i + 1`;
    		hello
    		;;
    	2)
    		echo 'l'
    		i=`expr $i + 1`;
    		hello
    		;;
    	3)
    		echo 'l'
    		i=`expr $i + 1`;
    		hello
    		;;
    	4)
    		echo 'o'
    		i=`expr $i + 1`;
    		hello
    		;;
    	5)
    		echo ' '
    		i=`expr $i + 1`;
    		hello
    		;;
    	6)
    		echo 'W'
    		i=`expr $i + 1`;
    		hello
    		;;
    	7)
    		echo 'o'
    		i=`expr $i + 1`;
    		hello
    		;;
    	8)
    		echo 'r'
    		i=`expr $i + 1`;
    		hello
    		;;
    	9)
    		echo 'l'
    		i=`expr $i + 1`;
    		hello
    		;;
    	10)
    		echo 'd'
    		i=`expr $i + 1`;
    		hello
    		;;
    	11)
    		echo '!'
    		;;
    	esac
    }
    
    hello
    Greetings,
    Nepomuk

    PS.: This Thread will be unstuck tomorrow, so don't worry dear fellow mods.
Working...