The first program you will probably ever write in any new programming language is the noteworthy
Hello World program. What does a
Hello World program do? It prints out the exact words
Hello World out onto the screen. Today we will be writing our own
Hello World program in Bash.
So let's begin.
- First you will need to create a blank Bash program, so create a file named
HelloWorld.shon your computer.
- Now with your text editor of choice open up the file we created called
- Now type in the following code into the text editor:
echo "Hello World"
- Now open up your terminal and make sure you are in the same directory of which you saved the file
- Now type in
bash HelloWorld.shand watch your program output the beautiful words
In the next tutorial we will be revising on what we did in this tutorial.