Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Shell Scripting

  • A Shell provides you with an interface to the Unix system.
  • It gathers input from you and executes programs based on that input.
  • When a program finishes executing, it displays that program's output.
  • Shell is an environment in which we can run our commands, programs, and shell scripts.

Shell Types

  • Bourne shell
  • C Shell

Shell Scripts

  • The basic concept of a shell script is a list of commands, which are listed in the order of execution.
  • A good shell script will have comments, preceded by # sign, describing the steps.

Hello World Example

#!/bin/bash
echo "Hello World!"

How To Open A Shell SCript (.sh file) from terminal

chmod +x /path/to/yourscript.sh - This gives Execution permission toyour script /path/to/yourscript.sh - This will run your script