Blog post

Creating a shell script for printing "HelloWorld" in linux

Posted on Dec 19, 2014
by Harish Kashyap
in Technology
with 1 comments

In linux You can use any editor like nano editor and vim editor for writing shell scripts.

In our example we are using nano editor

using command-> nano shellscriptname

and write this in the editor

#!/bin/bash
# My first shell script

echo "HelloWorld!"

then press key ctrl + X to save 

to run this script you can use bash or sh

when using bash command is -> bash shellscriptname

when using sh command is -> sh shellscriptname


1

Leave your comment

    Pradip Shukla
    on Dec 19, 2014
  1. Really helpfull content....

Leave your comment