Presentation is loading. Please wait.

Presentation is loading. Please wait.

Shell script

Similar presentations


Presentation on theme: "Shell script"— Presentation transcript:

1 Shell script www.rockfortnetworks.comwww.rockfortnetworks.com shellscript.bng@rockfortnetworks.comshellscript.bng@rockfortnetworks.com

2 About shell script  A shell script is a computer program designed to be run by the Unix shell, a command line interpreter. [1] The various dialects of shell scripts are considered to be scripting languages.computer programUnix shellcommand line interpreter [1]scripting languages  Shell scripts allow several commands that would be entered manually at a command-line interface to be executed automatically, and without having to wait for a user to trigger each stage of the sequence. For example, in a directory with three. source code files.  Simple batch jobs are not unusual for isolated tasks, but using shell loops, tests, and variables provides much more flexibility to users. A Bash (Unix shell) script to convert JPEG images to PNG images, typically saved in a file like /home/username/bin/jpg2pngBash (Unix shell)

3  A key feature of shell scripts is that the invocation of their interpreters is handled as a core operating system feature. So rather than a user's shell only being able to execute scripts in that shell's language, or a script only having its interpreter directive handled correctly if it was run from a shell (both of which were limitations in the early Bourne shell's handling of scripts), shell scripts are set up and executed by the OS itself.interpreter directive  Many modern shells also supply various features usually found only in more sophisticated general-purpose programming languages, such as control-flow constructs, variables, comments, arrays, subroutine and so on. With these sorts of features available, it is possible to write reasonably sophisticated applications as shell scripts.general-purpose programming languagessubroutine  Shell scripts often serve as an initial stage in software development, and are often subject to conversion later to a different underlying implementation, most commonly being converted to Perl, Python, or C. PerlPythonC

4 Architecture diagram of Unix shell script

5 Different types of shell script 1. Unix shell :- A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems.command-line interpretershelluser interfaceUnixoperating systemUnix-like The most influential Unix shells have been the Bourne shell and the C shell. These shells have both been used as the coding base and model for many derivative and work-alike shells with extended feature sets.Bourne shellC shell Users typically interact with a Unix shell using a terminal emulator.terminal emulator

6 2.Bourne shell:- The Bourne shell was one of the major shells used in early versions of the Unix operating system and became a de facto standard. It was written by Stephen R. Bourne at Bell Labs and was first distributed with Version 7 Unix, circa 1977.Bourne shellStephen R. BourneBell LabsVersion 7 Unix The POSIX standard specifies its standard shell as a strict subset of the Korn shell, an enhanced version of the Bourne shell. From a user's perspective the Bourne shell was immediately recognized when active by its characteristic default command line prompt character, the dollar sign ($).POSIXKorn shell

7 3.C shell :- The C shell was developed by Bill Joy for the Berkeley Software Distribution (BSD), a line of Unix operating systems derived from Unix and developed at the University of California, Berkeley. It was originally derived from the 6th Edition Unix shell (Thompson shell), with its syntax modeled after the C programming language.C shellBill JoyBerkeley Software DistributionThompson shellC programming language The C shell is used primarily for interactive terminal use, and less frequently for scripting and operating system control. It has interactive keyboard shortcuts in form of special control-key sequences for special effects such as job control.

8 Features of shell script  Perhaps the biggest advantage of writing a shell script is that the commands and syntax are exactly the same as those directly entered at the command line.  writing a shell script is much quicker than writing the equivalent code in other programming languages.  Interpretive running makes it easy to write debugging code into a script and re-run it to detect and fix bugs.  Non-expert users can use scripting to tailor the behavior of programs, and shell scripting provides some limited scope for multiprocessing.  This is made more problematic by the fact that many UNIX commands differ in name by only one letter: cp, cd, dd, df, etc.cddddf

9 contents 1 Capabilities  1.1 Shortcuts 1.1 Shortcuts  1.2 Batch jobs 1.2 Batch jobs  1.3 Generalization 1.3 Generalization  1.4 Verisimilitude 1.4 Verisimilitude  1.5 Programming 1.5 Programming 2 Other scripting languages 3 Life cycle 4 Advantages and disadvantages 5 See also 6 References 7 External links

10 Salient features of shell script :  80% hands on / practical classes.  Real time Scenarios / Project Exposure.  Limited no of students per batch.  Corporate Training Atmosphere  Week end Batches to suit Professional.  Placement Assistance which includes 1. Resume Preparation 2. Individual Counselling 3. Offline Support, which includes email queries and assignments. 4. Association with people who are working for more than 20 Companies who may provide interviews.  Backup Classes.  Provision to come for one more batch.

11  Platinum features of shell script Will get complete product development cycle, which includes o Demand from customer. o Design-decision. o Conceptualization. o Analysis. o Design finalize. o DFMEA. o Finalization. o Drawing release. o Tool design. o Product to the market.


Download ppt "Shell script"

Similar presentations


Ads by Google