Open a editor and write the below mentioned code
#!/bin/bash
echo "Hello World!!!"
sh helloworld.sh
or
bash helloworld.sh
or
chmod 755 ./helloworld.sh
./helloworld.sh
#! is called shebang code
shebang is used to represent the way to execute the script. This is a Unix concept. Its applicable for all scripting language on Unix flavoured operating systems. shebang code is a good practice to write in a scripting language.
shebang code has to be the files first character. if you write shebang code in second line then it will be treated as comment.
shebang code is not mandatory in a script file. Without shebang also a script can execute. Shebang is required when you execute using ./filename( ./helloworld.sh).
echo is a command which will print all the contents to the terminal or output.