1. How to run echo command in shell scripting

shell scripting

How to run echo command in shell scripting?

Creating one scripting file in Linux. We are using Ubuntu, so we are using vim editor but you can use vi editors in Other Linux to creating a script file.

root@devops:/script/script# vim 1echo.sh

vim [file_name]

we are touching this file by a touch command. The system will know we have one file and with the latest update.

root@devops:/script/script# touch 1echo.sh

touch file_name

our file doesn’t have to execute permission. We are giving this permission by chmod command +x to execute.

Chmod +x file_name
root@devops:/script/script# chmod +x 1echo.sh

To run any shell script in the Linux we have to use


If we check our shell script is

#! /bin/bash

echo " any output, you want to show"

echo " $PWD"

echo " $HOME"

echo "$DATE"

we can check our shell script by

cat file_name

after running our script we can get our values, whatever we passed inside our shell script.

root@devops:/script/script# ./1echo.sh




Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts

Copyright © 2014-2018 Thearticlenow | All Rights Reserved.