473,506 Members | 17,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hello World Day

Nepomuk
3,112 Recognized Expert Specialist
Hi everybody!
As was suggested here, today should be Hello World Day! So, here's my Hello World Program in bash script:
Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. i=0;
  3. function hello {
  4.     case $i in
  5.     0)
  6.         echo 'H'
  7.         i=`expr $i + 1`;
  8.         hello
  9.         ;;
  10.     1)
  11.         echo 'e'
  12.         i=`expr $i + 1`;
  13.         hello
  14.         ;;
  15.     2)
  16.         echo 'l'
  17.         i=`expr $i + 1`;
  18.         hello
  19.         ;;
  20.     3)
  21.         echo 'l'
  22.         i=`expr $i + 1`;
  23.         hello
  24.         ;;
  25.     4)
  26.         echo 'o'
  27.         i=`expr $i + 1`;
  28.         hello
  29.         ;;
  30.     5)
  31.         echo ' '
  32.         i=`expr $i + 1`;
  33.         hello
  34.         ;;
  35.     6)
  36.         echo 'W'
  37.         i=`expr $i + 1`;
  38.         hello
  39.         ;;
  40.     7)
  41.         echo 'o'
  42.         i=`expr $i + 1`;
  43.         hello
  44.         ;;
  45.     8)
  46.         echo 'r'
  47.         i=`expr $i + 1`;
  48.         hello
  49.         ;;
  50.     9)
  51.         echo 'l'
  52.         i=`expr $i + 1`;
  53.         hello
  54.         ;;
  55.     10)
  56.         echo 'd'
  57.         i=`expr $i + 1`;
  58.         hello
  59.         ;;
  60.     11)
  61.         echo '!'
  62.         ;;
  63.     esac
  64. }
  65.  
  66. hello
Greetings,
Nepomuk

PS.: This Thread will be unstuck tomorrow, so don't worry dear fellow mods.
Nov 21 '08 #1
0 1847

Sign in to post your reply or Sign up for a free account.

Similar topics

24
2383
by: Andy Sutorius | last post by:
Has anyone successfully created a Hello World program without using Visual Studio.NET? If so, what IDE did you use and what namespaces did you import? Thanks! Andy Sutorius
2
2166
by: ME | last post by:
I am trying to find a prewritten method for converting a string like this:"Hello World" to this "Hello\sWorld". I plan to use it to build a regular expression. Specifically I am looking for a...
17
2703
by: Tim Judd | last post by:
I must not be grasping anything here. Just a simple application, as follows (as any first-program is...) ---- #include <iostream.h> int main() { cout <<"hello world"; return 0;
6
4665
by: RC | last post by:
Hello World, I am try do call a JavaScript function from XSLT, but I got function not avaible error. See "????" below. Would someone out there tell me how? Thank Q! <xsl:stylesheet...
8
7548
by: vijay | last post by:
Hello, As the subject suggests, I need to print the string in the reverse order. I made the following program: # include<stdio.h> struct llnode { char *info;
4
6276
by: arnuld | last post by:
i am learning C and doing the exercise 1-1 of K&R2, where K&R ask to remove some parts of programme and experiment with error, so here i go: #include <stdio.h> int main () { printf('hello...
0
2176
by: C.W.Holeman II | last post by:
As K&R state the hardest part is getting a first instance to work. So I am looking for a "hello, world!" example for adding an additional element to an XHTML file. <html> <head><title>Hello,...
1
3226
by: James T. Dennis | last post by:
You'd think that using things like gettext would be easy. Superficially it seems well documented in the Library Reference(*). However, it can be surprisingly difficult to get the external details...
11
2977
by: cj | last post by:
Perhaps someone knows how to do this. When I open a new ASP.NET web service application in VS 2008, it opens with a simple Hello World web service already written. I want to see this work. ...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.