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
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
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
after running our script we can get our values, whatever we passed inside our shell script.
root@devops:/script/script# ./1echo.sh /script/script /root