How to write shell script in linux?

Step: 1

Open VI editor or GEDIT

Step: 2

Copy paste the following lines in that file
(example: filename-  myscript.sh)

#!/bin/bash
# My first script

echo "Hello World!"

Step: 3

Change the permission
sudo chmod -R 777 myscript.sh

Step: 4

Run the script

./myscript.sh

Popular posts from this blog

[Solved] Hive installation error: java.net.URISyntaxException: Relative path in absolute URI

Install Android SDK in centOs

Installing arules package (Association Rules) in R