Home > Programming > Shell Programming
EEE.314 Embedded Systems Shellscript tutorial
Sort Desciption:Shellscript tutorial. Dr. Bystrov. School of Electrical Electronic and Computer Engineering ... structured programming (C C++). extensive file operations ...
Content Inside:EEE.314 Embedded Systems Shellscript tutorialPage 1EEE.314 Embedded SystemsShellscript tutorialDr. BystrovSchool of Electrical Electronic and Computer EngineeringUniversity of Newcastle upon TyneEEE.314 Embedded SystemsShellscript tutorial p.1/17Page 2Shellscommand interpreterthe insulating layer between the operating systemkernel and the userpowerful programming language"gluing" together system calls tools utilities andcompiled binariescan use all UNIX commands utilities and toolsconvenient for administrative system tasksDifferent shells:sh family sh bash (Linux) ashcsh (Solaris) tcshtcl perl sed awkEEE.314 Embedded SystemsShellscript tutorial p.2/17Page 3When to use shellscript?interactive system administrationtailoring UNIX/Linux for your needs (e.g. embeddedapps)"quick and dirty" method of prototyping a complexapplicationclassical UNIX philosophy:breaking complex projects into simpler subtaskschaining together components and utilitiesUnlike other languagesit does not force you to alter your thinking to fit the tool!EEE.314 Embedded SystemsShellscript tutorial p.3/17Page 4When not to use shellscript?resourceintensive tasks where speed is a factorbut it can glue together highperformancecomponentsheavyduty math operationsfloating point arithmeticarbitrary precision calculationscomplex numberscrossplatform portability (use C instead)structured programming (C C++)extensive file operationsmultidimensional arrays linked lists or treesgraphicsEEE.314 Embedded SystemsShellscript tutorial p.4/17Page 5ShabangThe shabang ( #!) at the head of a script tells your systemthat this file is a set of commands to be fed to the commandinterpreter indicated.#!/bin/sh#!/bin/bash#!/usr/bin/p erl#!/usr/bin/tcl#!/bin/sed f#!/usr/awk fThe shabang is only needed if the interpreterspecificconstructs are used.EEE.314 Embedded SystemsShellscript tutorial p.5/17Page 6Invoking a scriptmake it executable and call it as any programchmod 700 script_file_nameexecute it by a ...
Source: www.staff.ncl.ac.uk
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Related Files
basic shell programming
Filed under: Programming and Shell Programmingbash derives much of its programming functionality from shell variables. Weve ... builtin variables that are vital to shell programming. ...
Unix Shell Scripts
Filed under: Programming and Shell Programmingthat file is called shell script language. Like other programming languages it has variables and flow control. statements (e.g. ifthenelse while for ...
UNIX Shell Programming
Filed under: Programming and Shell ProgrammingPage 1 of 1 ITC_UNIXsp ExecuTrain Course Outline UNIX Shell Programming IT0001 3 Days Description Students learn to read, write, and debug shell scripts, thus increasing ...
Automated testing using Shell Scripting
Filed under: Programming and Shell ProgrammingAdvanced Bash scripting guide from The Linux Documentation Project (TLDP). Unix Shell Programming by Yashavant Kanetkar BPB Publication. ...
Shell Programming
Filed under: Programming and Shell ProgrammingThis training in Shell Programming is designed for. administrator to create and debug shell scripts so as to. automate routine tasks. ...
