Computers understand only binary languages (0's and 1's), which are very difficult for humans to understand. So, for Linux OS (Operating System) there is a special program called Shell. This program accepts instructions or commands from users in English, and converts it to binary languages. We can say it is acts as a mediator for kernel - the heart of Linux. Shell uses the system kernel to execute programs and create files etc.
Shell
script is defined as the series of commands written in a text file.
Shell
scripts have more power than the MS-DOS.
Here is some shell script examples in Linux. First create a file with
an extension of .sh, for that take a terminal and type command gedit
myshell.sh
here i have used gedit you can use any editors, and change the file
permissions to executable format, for that we are using chmod
755 filename. For executing this file in terminal "./filename or bash filename".
Palindrome:
Output:Chess board:
Output:
Step wave form:
Output: