Innovation... driven by intelligence and logic

Shell Scripting using Bash

Abstract:

The shell is a command interpreter. More than just the insulating layer between the operating system kernel and the user, it's also a fairly powerful programming language. A shell program, called a script, is an easy -to- use tool for building applications by "gluing together" system calls, tools, utilities, and compiled binaries. Virtually the entire repertoire of UNIX commands, utilities, and tools is available for invocation by a shell script. If that were not enough, internal shell commands, such as testing and loop constructs, lend additional power and flexibility to scripts. Shell scrip ts are especially well suited for administrative system tasks and other routine repetit ive tasks not requiring the bells and whistles of a full-blown tightly structured programming language.


Training Topics in Brief:

  • Introduction to shells and scripts:
    • Shells, Usage, Types, entering and editing commands, Shell scripts, tools for editing, writing scripts.
  • Running and Controlling Scripts:
    • Referencing variables, loops and iterations, conditionals, if, test, case, examining environment variables, customizing accounts, handling CLI, executing.
  • Shell Scripting Functions:
    • Defining and Using Functions, arguments, return codes, variable scope, and global, local recursion.
  • Debugging Shell Scripts:
    • Deciphering Error Messages, Debugging Techniques and Running Scripts in Debugging Mode.
  • Scripting with Files and Text Processing with sed:
    • Combining Files into Archives, File Modes, test, here files and Interactive Programs.
  • Processing Text with sed:
    • Introduction, Versions, working with sed, selecting lines, substitution, advanced sed invocation, Advanced Addressing, Advanced Substitution, Hold Space.
  • Processing Text with awk:
    • Awk (Gawk, Mawk, Nawk, Oawk), Working with awk, invoking awk, control statements, functions.
  • Controlling Processes:
    • Exploring Processes, Launching processes Capturing output.

Salient features of Training Program:

Objective:

  • This project is designed to ensure that students of Engineering College with academic capabilities will have the skill set needed to deal with the challenges involved in real-world projects involving shell scripting using Bash to meet the needs of industries both today and in the future.

  • The reainee should be comfertable in writing and degugging efficient and power shell scripts using Bash on Linux

  • The course is taught mainly using the Bash Shell, with Linux operating system.

Pre-requisite:

  • Education: ​BE, B Tech in ECE, EEE, CSE, IT or MCA.

  • A prior knowledge of a basic Linux commands, general understanding about operating system concepts is assumed.

Agenda:

  • The Duration of training would be 9 working days
  • There would be:
    • 9 Classroom Sessions of 2 hours each
    • 8 Lab Sessions of 4 hours each
    • 50 hours of Training

Deliverables:

After the training is over, the Trainee should be able to:-

  • write shell scripts using Bash
  • Run and Controlling Scripts with ease
  • Debug shell scripts
  • Do scripting using files, sed, awk efficiently
  • Control processes
  • Implement Regular Expressions
  • use GNU SED and AWK programming
  • Able to arite scripts for system and network administration

EmbLogic would issue/provide the following:-

  • Work Report for Submitting into their college.
  • A presentation and demonstration assistance.
  • Completed tasks (by the trainee).
  • Certificate of Completion for the training and Project as mentioned above.

 

Introduction: 

 

The LiNIX shell program interprets user commands, which are either directly entered by the user, or which can be read from a file called the shell script or shell program. Shell scripts are interpreted, not compiled. The shell reads commands from the script line per line and searches for those commands on the system, while a compiler converts a program into machine readable form, an executable file - which may then be used in a shell script.

A shell is a program that takes commands typed by the user and calls the operating system to run those commands. The shell interprets your commands.

Prospects:

A working knowledge of shell scripting is essential to anyone wishing to become reasonably proficient at system administration, even if they do not anticipate ever having to actually write a script.

A detailed understanding of startup scripts is important for analyzing the behavior of a system, and possibly modifying it. 

A shell script is a quick-and-dirty method of prototyping a complex application. Getting even a limited subset of the functionality to work in a script is often a useful first stage in project development. In this way, the structure of the application can be tested and tinkered with, and the major pitfalls found before proceeding to the final coding in C, C++, Java, Perl, or Python

Shell scripting hearkens back to the classic UNIX philosophy of breaking complex projects into simpler subtasks, of chaining together components and utilities. Many consider this a better, or at least more esthetically pleasing approach to problem solving than using one of the new generation of high powered all-in-one languages, such as Perl, which attempt to be all things to all people, but at the cost of forcing you to alter your thinking processes to fit the tool.


Training and Project Resources  click here ...


EmbLogicTM is an ISO 9001:2008(QMS) (Quality Management System) Certified Company

 

Go to Top ^