Significance of scripting languages for operating system administration
Download
1 / 11

Significance of Scripting Languages for Operating System Administration - PowerPoint PPT Presentation


  • 43 Views
  • Uploaded on

INFuture2007. Significance of Scripting Languages for Operating System Administration. Vladimir Mateljan Željka Požgaj Krunoslav Peter. Introduction. analysis of scripting programming languages

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Significance of Scripting Languages for Operating System Administration' - wyatt


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Significance of scripting languages for operating system administration

INFuture2007

Significance of Scripting Languagesfor Operating System Administration

Vladimir Mateljan

Željka Požgaj

Krunoslav Peter


Introduction
Introduction

  • analysis of scripting programming languages

  • why they are significant for operating system (OS) administration, especially for automating administration tasks


Os administration
OS Administration

GUI Tool –

pointing and clicking

Command Line –

writing and executing commands


Automation of os administration
Automation of OS Administration

  • sequences of OS’s shell commands – simple programming solutions – scripts

  • scripting languages (SLs) can be used for development of program solutions used in the automation of OS administration with a minimum code usage


Scripting programming languages
Scripting Programming Languages

  • interpreted programming languages

  • building applications from reusable components

  • rapid application development

  • building minimalist but functional program solutions

  • examples:

    • bash – shell SL

    • awk – apattern scanning and text processing language


The shell language bash
The Shell Language - bash

  • simple and expressive syntax:

    • command:

      command [switch] [argument]

    • statement:

      command [; command]

    • piping (sending data from one to another command):

      command [| command]

    • redirection (sending data to file):

      command [> file]

    • script:

      statement

      [statement]


The p attern s canning and text p rocessing l anguage awk
ThePattern Scanning and Text Processing Language - awk

  • the syntax for invoking awk:

    • specifying a script on the command line:

      awk ‘script’ file [file]

    • invoking awk with a script file:

      awk -f script file [file]

  • the structure of the awk script:

    pattern { procedure }

    pattern { procedure }

    ...

  • example – counting rows in text file :

    $ awk '{ i++ } END { print i }' file.txt


Statement alias and script
Statement, Alias, and Script

  • statement:

    $ ls | grep txt | wc -l

  • alias:

    $ alias lsx='ls | wc -l'

  • script:

    #!/bin/bash

    echo __Text Docs__ > doc.txt

    ls | grep doc >> doc.txt


Pragmatics of sl
Pragmatics of SL

  • simple and expressive syntax

  • single data type – string

  • powerful operations – piping and redirection

  • example – stoping process that has string “sleep” in name:

    $ ps | awk '$4 ~ /sleep/ { cmd = "kill -9 " $1; print | cmd }'


Significance of sls for os administration
Significance of SLs for OS Administration

  • scripts – tools for automating common administration tasks

  • additional benefits:

    • documenting steps of administration tasks

    • history (execution log)


Conclusion
Conclusion

  • SLs are appropriate for rapid development of program solutions used in the automation of OS administration with a minimum code usage

  • integration of reusable components from the framework that includes OS's shell commands


ad