Trending
Heat Index
Linux Beginner
 
Read More
220How-to-update-Kernel-version-on-CentOS-7
 
Read More
129Light-weight-Text-Editor-tools
 
Read More
136Linux-Route-Add-Command-with-examples

 
Read More
223How-to-create-Multiple-IP-Address-to-Single-Network-interface
 
Read More
107How-to-Install-Linux-Kernel-4.5-in-Ubuntu
Posts Tagged ‘shell scripting’
Most Recent
 
Read More
April 13, 2016

Basic Shell scripting in Linux

Basic Shell scripting in Linux

Scripts is a collection of commands that are stored in a file. Shell reads this file and acts on the commands as if they were typed in the keyboard. In this article, we will learn how to write Shell Scripts.

Basic step of shell script [root@linuxhelp~]# vim file1.sh Echo “this is my first script”

Note: No need of giving .sh at last of file, it will automatically recognize the script. So ./filename is alone is enough to run the script.

[root@linuxhelp~]# sh file1.sh this is my first script

If it not executed we need to change the mode to be executed as follows,

[root@linuxhelp~]# chmod 744 file1.sh

Next, we can [...]

136
Advertisment