This is how you would display “Hello World” in Bash.
Create a text file called hello_world.sh
containing the following code:
1 2 3 4 5 |
#!/bin/bash # declare STRING variable STRING="Hello World" #print variable on a screen echo $STRING |
hello_world.sh
is located and make the file executable:
1 |
$ chmod +x hello_world.sh |
1 |
./hello_world.sh |