SlideShare a Scribd company logo
Tutor Session - 3




Chulalongkorn
                                                                           Tutor Session III:


                               UNIX Shell Script
 University




                                  Programming

                Wongyos Keardsri (P’Bank)
                Department of Computer Engineering
                Faculty of Engineering, Chulalongkorn University
                Bangkok, Thailand
                Mobile Phone: 089-5993490
                E-mail: wongyos@gmail.com, MSN: bankberrer@hotmail.com
                Twitter: @wongyos
                                                 2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                     Tutor Outline
Chulalongkorn
 University



                Introduction to Shell               Data Operations
                   Shell                            Decision Statements
                   Shell Script                          If-else
                Variables                                Switch-case
                   Creating/Assigning               Iteration Statement
                   Accessing                             For
                   Setting                               While
                Getting Start Shell Script
                   Include shell
                   Create shell
                   Run shell

         2                                   2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                    Introduction to Shell
Chulalongkorn
 University




                What is the shell or Unix shell?
                  A command-line interpreter and script host that
                  provides a traditional user interface for the Unix
                  operating system and for Unix-like systems
                  There are many shells; sh, bash, ksh, csh, zsh, …
                Bourne Shell (sh)
                  Written by Stephen Bourne
                  Was the 1st popular Unix shell



         3                                 2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                   Introduction to Shell
Chulalongkorn
 University                                                                     (Cont)
                Bourne Shell (sh) (Cont)
                  Available on all Unix systems
                  Supports a fairly versatile programming language
                  A subset of more powerful Korn shell (ksh)
                  Implement with regular C programming
                  Executable file is stored as /bin/sh




         4                                2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                               Variables
Chulalongkorn
 University


                Creating and assigning a variable
                        name=value
                                                    No spaces
                Printing/Showing a variable value
                        echo $name
                                                    With spaces
                Setting environment variable
                        export NAME

                Read only variable
                       readonly name
         5                              2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                                  Variables
Chulalongkorn
 University




                Example
                $ age=15
                $ nickname=Bank
                $ echo I'm $nickname, $age years old



                     More an examples by yourself




         6                                 2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                                      Variables
Chulalongkorn
 University                                                                          (Cont)
                Accessing a variable
                   Syntax                                Action
                $name          Replaced by the value of name.
                ${name}        Replaced by the value of name.
                ${name-word}   Replaced by the value of name if set, and word otherwise.
                ${name+word}   Replaced by word if name is set, and nothing otherwise.
                ${name=word}   Assign word to the variable name if name is not already
                               set and then replaced by the value of name.
                ${name?word}   Replaced by name if name is set. If name is not set, word
                               is displayed to the standard error and the shell is exited.



         7                                     2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                                    Variables
Chulalongkorn
 University                                                                        (Cont)
                Example
                $   verb=sing
                $   echo I like $verbing
                I   like
                $   echo I like ${verb}ing
                I   like singing



                       More an examples by yourself




         8                                   2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                            Getting Start Shell Script
Chulalongkorn
 University




                What is the shell script?
                  Similar to DOS batch files
                  Quick and simple programming
                  Text file interpreted by shell, effectively new command
                  List of shell commands to be run sequentially
                  Typical operations for file manipulation, program
                  execution, and printing text




         9                                2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                            Getting Start Shell Script
Chulalongkorn
 University                                                                    (Cont)
                Include full path to interpreter (shell)
                       #!/path/shell

                Example
                 #!/bin/sh
                 #!/usr/bin/sh
                 #!/bin/csh -f




         10                              2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                           Getting Start Shell Script
Chulalongkorn
 University                                                                 (Cont)
                Using vi command to create shell script file
                Running shell script by using the command below
                 sh [file]

                Example
                 $ vi test.sh
                 ...
                 $ sh test.sh




         11                           2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                            Getting Start Shell Script
Chulalongkorn
 University                                                                   (Cont)
                Interaction with user
                  Output value
                   echo [texts/variables]
                  Input value
                   read [variables]

                Comment line
                 # your comments


         12                             2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                            Getting Start Shell Script
Chulalongkorn
 University                                                                   (Cont)
                Special Variables
                  $#      Number of arguments on command line
                  $0      Name that script was called as
                  $1-$9   Command line arguments
                  $*      All arguments
                  $@      All arguments (separately quoted)
                  $?      Numeric result code of previous command
                  $$      Process ID of this running script



         13                             2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                            Getting Start Shell Script
Chulalongkorn
 University                                                                      (Cont)
                Example
                $ cat example1.sh
                echo there are $# command line arguments: $@
                $ sh example1.sh
                there are 0 command line arguments:
                $ sh example1.sh x y z
                there are 3 command line arguments: x y z


                     More an examples by yourself



         14                                2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                              Data Operation
Chulalongkorn
 University




                Operators
                    Operators                        Meaning
            * / %               multiplication, division, remainder
            + -                 addition, subtraction
            = != > < >= <=      comparison operators
            &                   logical and
            |                   logical or

                Using expr to excute operators
                 expr $va1 op $var2

         15                             2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                  Data Operation
Chulalongkorn
 University                                                                          (Cont)
                Conditional Expressions
                test [expression]
                  test returns a zero exit code if expression evaluates to true;
                  otherwise, nonzero exit status

                test forms
                  -d   filename         True if filname exists as a directory file
                  -f   filename         True if filname exists as a nondirectory file
                  -l   string           True if length of string is nonzero
                  -n   string           True if string contains at least one character


         16                                    2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                            Data Operation
Chulalongkorn
 University                                                                   (Cont)
                test forms (Cont)
                  -r filename     True if filname exists as a readable file
                  -w filename     True if filname exists as a writable file
                  -x filename     True if filname exists as an executable file
                  -z string       True if string contains no characters
                  str1 = str2     True if str1 is equal to str2
                  str1 != str2    True if str1 is not equal to str2
                  string          True if string is not null
                  int1 -eq int2   True if int1 is equal to int2
                  int1 -ne int2   True if int1 is not equal to int2
                  int1 -gt int2   True if int1 is greater than int2

         17                             2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                               Data Operation
Chulalongkorn
 University                                                                       (Cont)
                test forms (Cont)
                  int1 -ge   int2  True if int1 is greater than or equal to int2
                  int1 -lt   int2  True if int1 is less than int2
                  int1 -le   int2  True if int1 is less than or equalt to int2
                  !expr            True if expr is false
                  expr1 -a   expr2 True if ezpr1 and expr2 are true
                  expr1 -o   expr2 True if ezpr1 or expr2 are true




         18                                 2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                    Decision Statement
Chulalongkorn
 University




                If-else statement
                if [condition]
                   then [result]
                elif [condition]
                   then [result]
                else
                   [result]
                fi




         19                           2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                     Decision Statement
Chulalongkorn
 University                                                                    (Cont)
                Example
                if test -r file1
                   then echo "file1"
                elif [ -r file2 ]         test –r file2
                   then cp file2 file3
                   echo "file2 copy to file3"
                else
                   echo "no file"
                fi

                          More the examples by yourself


         20                              2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                  Decision Statement
Chulalongkorn
 University                                                                   (Cont)
                Switch-case statement
                case $var in
                  value1) [result] ;;
                  value2) [result] ;;
                  ...
                  *) [result] ;;
                                                   Default case
                esac




         21                             2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                     Decision Statement
Chulalongkorn
 University                                                                     (Cont)
                Example
                case $day in
                  Monday ) echo "A new week" ;;
                  Saturday | Sunday ) echo "Free" ;;
                  Friday ) echo "Hooray !!" ;;
                  * ) echo "It is $DAY" ;;
                esac


                      More the examples by yourself




         22                               2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                         Iteration Statement
Chulalongkorn
 University




                For statement
                for var {in [word]+}
                do
                   [result]
                done
                  Iterate the value of the variable var through each word in the word
                  list
                  Evaluate the command in list after each iteration
                  If no word is supplied, $@ ($1 ..) is used instead
                  A break command causes the loop to terminate
                  A continue command causes the loop to jump to the next iteration
         23                                  2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                      Iteration Statement
Chulalongkorn
 University                                                                     (Cont)
                Example
                for color in red yellow green blue
                  do echo one color is $color
                done

                for x
                  do echo x = $x
                done


                      More the examples by yourself


         24                               2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                  Iteration Statement
Chulalongkorn
 University                                                               (Cont)
                While statement
                while [condition]
                do                     test $var1 –opt $var2
                   [result]
                done




         25                         2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                   Iteration Statement
Chulalongkorn
 University                                                                  (Cont)
                Example
                while true
                do
                   who | grep u51xxx
                   sleep 30
                done
                                         More the examples by yourself
                x=1
                while test $x -le 10
                do
                   echo x is $x
                   x=`expr $x + 1`
                done
         26                            2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                          See More
Chulalongkorn
 University



         [1] http://www.grymoire.com/Unix/Sh.html
         [2] http://www.ooblick.com/text/sh/
         [3] http://www.injunea.demon.co.uk/pages/page204.htm




         27                          2110313 Operating Systems and System Programs (1/2010)
Tutor Session - 3



                                                               End
Chulalongkorn
 University




                Question ?


                           … Answer
         28              2110313 Operating Systems and System Programs (1/2010)

More Related Content

Viewers also liked

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master Program
Wongyos Keardsri
 
IP address anonymization
IP address anonymizationIP address anonymization
IP address anonymization
Wongyos Keardsri
 
Java-Answer Chapter 12-13 (For Print)
Java-Answer Chapter 12-13 (For Print)Java-Answer Chapter 12-13 (For Print)
Java-Answer Chapter 12-13 (For Print)Wongyos Keardsri
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and Objects
Wongyos Keardsri
 
Java-Chapter 12 Classes and Objects
Java-Chapter 12 Classes and ObjectsJava-Chapter 12 Classes and Objects
Java-Chapter 12 Classes and Objects
Wongyos Keardsri
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applications
Wongyos Keardsri
 
Final morris esri_nwgis_lidar
Final morris esri_nwgis_lidarFinal morris esri_nwgis_lidar
Final morris esri_nwgis_lidar
Eric Morris
 
Ch2(working with forms)
Ch2(working with forms)Ch2(working with forms)
Ch2(working with forms)
Chhom Karath
 
Appendex a
Appendex aAppendex a
Appendex aswavicky
 
Appendex b
Appendex bAppendex b
Appendex bswavicky
 
Chapter 4 Form Factors & Power Supplies
Chapter 4 Form Factors & Power SuppliesChapter 4 Form Factors & Power Supplies
Chapter 4 Form Factors & Power SuppliesPatty Ramsey
 
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater SourceGuidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
eWater
 
CIS 110 Chapter 1 Intro to Computers
CIS 110 Chapter 1 Intro to ComputersCIS 110 Chapter 1 Intro to Computers
CIS 110 Chapter 1 Intro to ComputersPatty Ramsey
 
C# programs
C# programsC# programs
C# programs
Syed Mustafa
 
Php i-slides
Php i-slidesPhp i-slides
Php i-slides
zalatarunk
 
Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)
Chhom Karath
 
Appendex e
Appendex eAppendex e
Appendex eswavicky
 
Unix Master
Unix MasterUnix Master
Unix Master
Paolo Marcatili
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
prabhatjon
 

Viewers also liked (20)

How to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master ProgramHow to Study and Research in Computer-related Master Program
How to Study and Research in Computer-related Master Program
 
IP address anonymization
IP address anonymizationIP address anonymization
IP address anonymization
 
k10947 Ppt ic
k10947 Ppt ick10947 Ppt ic
k10947 Ppt ic
 
Java-Answer Chapter 12-13 (For Print)
Java-Answer Chapter 12-13 (For Print)Java-Answer Chapter 12-13 (For Print)
Java-Answer Chapter 12-13 (For Print)
 
Java-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and ObjectsJava-Chapter 13 Advanced Classes and Objects
Java-Chapter 13 Advanced Classes and Objects
 
Java-Chapter 12 Classes and Objects
Java-Chapter 12 Classes and ObjectsJava-Chapter 12 Classes and Objects
Java-Chapter 12 Classes and Objects
 
The next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applicationsThe next generation intelligent transport systems: standards and applications
The next generation intelligent transport systems: standards and applications
 
Final morris esri_nwgis_lidar
Final morris esri_nwgis_lidarFinal morris esri_nwgis_lidar
Final morris esri_nwgis_lidar
 
Ch2(working with forms)
Ch2(working with forms)Ch2(working with forms)
Ch2(working with forms)
 
Appendex a
Appendex aAppendex a
Appendex a
 
Appendex b
Appendex bAppendex b
Appendex b
 
Chapter 4 Form Factors & Power Supplies
Chapter 4 Form Factors & Power SuppliesChapter 4 Form Factors & Power Supplies
Chapter 4 Form Factors & Power Supplies
 
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater SourceGuidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
 
CIS 110 Chapter 1 Intro to Computers
CIS 110 Chapter 1 Intro to ComputersCIS 110 Chapter 1 Intro to Computers
CIS 110 Chapter 1 Intro to Computers
 
C# programs
C# programsC# programs
C# programs
 
Php i-slides
Php i-slidesPhp i-slides
Php i-slides
 
Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)Ch7(publishing my sql data on the web)
Ch7(publishing my sql data on the web)
 
Appendex e
Appendex eAppendex e
Appendex e
 
Unix Master
Unix MasterUnix Master
Unix Master
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 

Similar to SysProg-Tutor 03 Unix Shell Script Programming

Perl 101 - The Basics of Perl Programming
Perl  101 - The Basics of Perl ProgrammingPerl  101 - The Basics of Perl Programming
Perl 101 - The Basics of Perl ProgrammingUtkarsh Sengar
 
CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...
CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...
CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...
ijdms
 
Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...
Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...
Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...
ijdms
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training
Nancy Thomas
 
Unix Shell Script
Unix Shell ScriptUnix Shell Script
Unix Shell Scriptstudent
 
SELFLESS INHERITANCE
SELFLESS INHERITANCESELFLESS INHERITANCE
SELFLESS INHERITANCE
ijpla
 
Cross-lingual event-mining using wordnet as a shared knowledge interface
Cross-lingual event-mining using wordnet as a shared knowledge interfaceCross-lingual event-mining using wordnet as a shared knowledge interface
Cross-lingual event-mining using wordnet as a shared knowledge interface
pathsproject
 
Previewing OWL Changes and Refactorings Using a Flexible XML Database
Previewing OWL Changes and Refactorings Using a Flexible XML DatabasePreviewing OWL Changes and Refactorings Using a Flexible XML Database
Previewing OWL Changes and Refactorings Using a Flexible XML Database
Christoph Lange
 
Obect-Oriented Collaboration
Obect-Oriented CollaborationObect-Oriented Collaboration
Obect-Oriented Collaboration
Alena Holligan
 

Similar to SysProg-Tutor 03 Unix Shell Script Programming (10)

UML01
UML01UML01
UML01
 
Perl 101 - The Basics of Perl Programming
Perl  101 - The Basics of Perl ProgrammingPerl  101 - The Basics of Perl Programming
Perl 101 - The Basics of Perl Programming
 
CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...
CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...
CONSIDERING STRUCTURAL AND VOCABULARY HETEROGENEITY IN XML QUERY: FPTPQ AND H...
 
Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...
Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...
Considering Structural and Vocabulary Heterogeneity in XML Query: FPTPQ and H...
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training
 
Unix Shell Script
Unix Shell ScriptUnix Shell Script
Unix Shell Script
 
SELFLESS INHERITANCE
SELFLESS INHERITANCESELFLESS INHERITANCE
SELFLESS INHERITANCE
 
Cross-lingual event-mining using wordnet as a shared knowledge interface
Cross-lingual event-mining using wordnet as a shared knowledge interfaceCross-lingual event-mining using wordnet as a shared knowledge interface
Cross-lingual event-mining using wordnet as a shared knowledge interface
 
Previewing OWL Changes and Refactorings Using a Flexible XML Database
Previewing OWL Changes and Refactorings Using a Flexible XML DatabasePreviewing OWL Changes and Refactorings Using a Flexible XML Database
Previewing OWL Changes and Refactorings Using a Flexible XML Database
 
Obect-Oriented Collaboration
Obect-Oriented CollaborationObect-Oriented Collaboration
Obect-Oriented Collaboration
 

More from Wongyos Keardsri

Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIWongyos Keardsri
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IWongyos Keardsri
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsWongyos Keardsri
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityWongyos Keardsri
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 CountingWongyos Keardsri
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIWongyos Keardsri
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IWongyos Keardsri
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesWongyos Keardsri
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesWongyos Keardsri
 
Discrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationDiscrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationWongyos Keardsri
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindow
Wongyos Keardsri
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 Recursions
Wongyos Keardsri
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional Arrays
Wongyos Keardsri
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and Applications
Wongyos Keardsri
 
Java-Chapter 08 Methods
Java-Chapter 08 MethodsJava-Chapter 08 Methods
Java-Chapter 08 Methods
Wongyos Keardsri
 

More from Wongyos Keardsri (20)

Discrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part IIIDiscrete-Chapter 11 Graphs Part III
Discrete-Chapter 11 Graphs Part III
 
Discrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part IIDiscrete-Chapter 11 Graphs Part II
Discrete-Chapter 11 Graphs Part II
 
Discrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part IDiscrete-Chapter 11 Graphs Part I
Discrete-Chapter 11 Graphs Part I
 
Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
Discrete-Chapter 09 Algorithms
Discrete-Chapter 09 AlgorithmsDiscrete-Chapter 09 Algorithms
Discrete-Chapter 09 Algorithms
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Discrete-Chapter 07 Probability
Discrete-Chapter 07 ProbabilityDiscrete-Chapter 07 Probability
Discrete-Chapter 07 Probability
 
Discrete-Chapter 06 Counting
Discrete-Chapter 06 CountingDiscrete-Chapter 06 Counting
Discrete-Chapter 06 Counting
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Discrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part IIDiscrete-Chapter 04 Logic Part II
Discrete-Chapter 04 Logic Part II
 
Discrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part IDiscrete-Chapter 04 Logic Part I
Discrete-Chapter 04 Logic Part I
 
Discrete-Chapter 03 Matrices
Discrete-Chapter 03 MatricesDiscrete-Chapter 03 Matrices
Discrete-Chapter 03 Matrices
 
Discrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and SequencesDiscrete-Chapter 02 Functions and Sequences
Discrete-Chapter 02 Functions and Sequences
 
Discrete-Chapter 01 Sets
Discrete-Chapter 01 SetsDiscrete-Chapter 01 Sets
Discrete-Chapter 01 Sets
 
Discrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling ComputationDiscrete-Chapter 12 Modeling Computation
Discrete-Chapter 12 Modeling Computation
 
Java-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindowJava-Chapter 14 Creating Graphics with DWindow
Java-Chapter 14 Creating Graphics with DWindow
 
Java-Chapter 11 Recursions
Java-Chapter 11 RecursionsJava-Chapter 11 Recursions
Java-Chapter 11 Recursions
 
Java-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional ArraysJava-Chapter 10 Two Dimensional Arrays
Java-Chapter 10 Two Dimensional Arrays
 
Java-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and ApplicationsJava-Chapter 09 Advanced Statements and Applications
Java-Chapter 09 Advanced Statements and Applications
 
Java-Chapter 08 Methods
Java-Chapter 08 MethodsJava-Chapter 08 Methods
Java-Chapter 08 Methods
 

Recently uploaded

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

SysProg-Tutor 03 Unix Shell Script Programming

  • 1. Tutor Session - 3 Chulalongkorn Tutor Session III: UNIX Shell Script University Programming Wongyos Keardsri (P’Bank) Department of Computer Engineering Faculty of Engineering, Chulalongkorn University Bangkok, Thailand Mobile Phone: 089-5993490 E-mail: wongyos@gmail.com, MSN: bankberrer@hotmail.com Twitter: @wongyos 2110313 Operating Systems and System Programs (1/2010)
  • 2. Tutor Session - 3 Tutor Outline Chulalongkorn University Introduction to Shell Data Operations Shell Decision Statements Shell Script If-else Variables Switch-case Creating/Assigning Iteration Statement Accessing For Setting While Getting Start Shell Script Include shell Create shell Run shell 2 2110313 Operating Systems and System Programs (1/2010)
  • 3. Tutor Session - 3 Introduction to Shell Chulalongkorn University What is the shell or Unix shell? A command-line interpreter and script host that provides a traditional user interface for the Unix operating system and for Unix-like systems There are many shells; sh, bash, ksh, csh, zsh, … Bourne Shell (sh) Written by Stephen Bourne Was the 1st popular Unix shell 3 2110313 Operating Systems and System Programs (1/2010)
  • 4. Tutor Session - 3 Introduction to Shell Chulalongkorn University (Cont) Bourne Shell (sh) (Cont) Available on all Unix systems Supports a fairly versatile programming language A subset of more powerful Korn shell (ksh) Implement with regular C programming Executable file is stored as /bin/sh 4 2110313 Operating Systems and System Programs (1/2010)
  • 5. Tutor Session - 3 Variables Chulalongkorn University Creating and assigning a variable name=value No spaces Printing/Showing a variable value echo $name With spaces Setting environment variable export NAME Read only variable readonly name 5 2110313 Operating Systems and System Programs (1/2010)
  • 6. Tutor Session - 3 Variables Chulalongkorn University Example $ age=15 $ nickname=Bank $ echo I'm $nickname, $age years old More an examples by yourself 6 2110313 Operating Systems and System Programs (1/2010)
  • 7. Tutor Session - 3 Variables Chulalongkorn University (Cont) Accessing a variable Syntax Action $name Replaced by the value of name. ${name} Replaced by the value of name. ${name-word} Replaced by the value of name if set, and word otherwise. ${name+word} Replaced by word if name is set, and nothing otherwise. ${name=word} Assign word to the variable name if name is not already set and then replaced by the value of name. ${name?word} Replaced by name if name is set. If name is not set, word is displayed to the standard error and the shell is exited. 7 2110313 Operating Systems and System Programs (1/2010)
  • 8. Tutor Session - 3 Variables Chulalongkorn University (Cont) Example $ verb=sing $ echo I like $verbing I like $ echo I like ${verb}ing I like singing More an examples by yourself 8 2110313 Operating Systems and System Programs (1/2010)
  • 9. Tutor Session - 3 Getting Start Shell Script Chulalongkorn University What is the shell script? Similar to DOS batch files Quick and simple programming Text file interpreted by shell, effectively new command List of shell commands to be run sequentially Typical operations for file manipulation, program execution, and printing text 9 2110313 Operating Systems and System Programs (1/2010)
  • 10. Tutor Session - 3 Getting Start Shell Script Chulalongkorn University (Cont) Include full path to interpreter (shell) #!/path/shell Example #!/bin/sh #!/usr/bin/sh #!/bin/csh -f 10 2110313 Operating Systems and System Programs (1/2010)
  • 11. Tutor Session - 3 Getting Start Shell Script Chulalongkorn University (Cont) Using vi command to create shell script file Running shell script by using the command below sh [file] Example $ vi test.sh ... $ sh test.sh 11 2110313 Operating Systems and System Programs (1/2010)
  • 12. Tutor Session - 3 Getting Start Shell Script Chulalongkorn University (Cont) Interaction with user Output value echo [texts/variables] Input value read [variables] Comment line # your comments 12 2110313 Operating Systems and System Programs (1/2010)
  • 13. Tutor Session - 3 Getting Start Shell Script Chulalongkorn University (Cont) Special Variables $# Number of arguments on command line $0 Name that script was called as $1-$9 Command line arguments $* All arguments $@ All arguments (separately quoted) $? Numeric result code of previous command $$ Process ID of this running script 13 2110313 Operating Systems and System Programs (1/2010)
  • 14. Tutor Session - 3 Getting Start Shell Script Chulalongkorn University (Cont) Example $ cat example1.sh echo there are $# command line arguments: $@ $ sh example1.sh there are 0 command line arguments: $ sh example1.sh x y z there are 3 command line arguments: x y z More an examples by yourself 14 2110313 Operating Systems and System Programs (1/2010)
  • 15. Tutor Session - 3 Data Operation Chulalongkorn University Operators Operators Meaning * / % multiplication, division, remainder + - addition, subtraction = != > < >= <= comparison operators & logical and | logical or Using expr to excute operators expr $va1 op $var2 15 2110313 Operating Systems and System Programs (1/2010)
  • 16. Tutor Session - 3 Data Operation Chulalongkorn University (Cont) Conditional Expressions test [expression] test returns a zero exit code if expression evaluates to true; otherwise, nonzero exit status test forms -d filename True if filname exists as a directory file -f filename True if filname exists as a nondirectory file -l string True if length of string is nonzero -n string True if string contains at least one character 16 2110313 Operating Systems and System Programs (1/2010)
  • 17. Tutor Session - 3 Data Operation Chulalongkorn University (Cont) test forms (Cont) -r filename True if filname exists as a readable file -w filename True if filname exists as a writable file -x filename True if filname exists as an executable file -z string True if string contains no characters str1 = str2 True if str1 is equal to str2 str1 != str2 True if str1 is not equal to str2 string True if string is not null int1 -eq int2 True if int1 is equal to int2 int1 -ne int2 True if int1 is not equal to int2 int1 -gt int2 True if int1 is greater than int2 17 2110313 Operating Systems and System Programs (1/2010)
  • 18. Tutor Session - 3 Data Operation Chulalongkorn University (Cont) test forms (Cont) int1 -ge int2 True if int1 is greater than or equal to int2 int1 -lt int2 True if int1 is less than int2 int1 -le int2 True if int1 is less than or equalt to int2 !expr True if expr is false expr1 -a expr2 True if ezpr1 and expr2 are true expr1 -o expr2 True if ezpr1 or expr2 are true 18 2110313 Operating Systems and System Programs (1/2010)
  • 19. Tutor Session - 3 Decision Statement Chulalongkorn University If-else statement if [condition] then [result] elif [condition] then [result] else [result] fi 19 2110313 Operating Systems and System Programs (1/2010)
  • 20. Tutor Session - 3 Decision Statement Chulalongkorn University (Cont) Example if test -r file1 then echo "file1" elif [ -r file2 ] test –r file2 then cp file2 file3 echo "file2 copy to file3" else echo "no file" fi More the examples by yourself 20 2110313 Operating Systems and System Programs (1/2010)
  • 21. Tutor Session - 3 Decision Statement Chulalongkorn University (Cont) Switch-case statement case $var in value1) [result] ;; value2) [result] ;; ... *) [result] ;; Default case esac 21 2110313 Operating Systems and System Programs (1/2010)
  • 22. Tutor Session - 3 Decision Statement Chulalongkorn University (Cont) Example case $day in Monday ) echo "A new week" ;; Saturday | Sunday ) echo "Free" ;; Friday ) echo "Hooray !!" ;; * ) echo "It is $DAY" ;; esac More the examples by yourself 22 2110313 Operating Systems and System Programs (1/2010)
  • 23. Tutor Session - 3 Iteration Statement Chulalongkorn University For statement for var {in [word]+} do [result] done Iterate the value of the variable var through each word in the word list Evaluate the command in list after each iteration If no word is supplied, $@ ($1 ..) is used instead A break command causes the loop to terminate A continue command causes the loop to jump to the next iteration 23 2110313 Operating Systems and System Programs (1/2010)
  • 24. Tutor Session - 3 Iteration Statement Chulalongkorn University (Cont) Example for color in red yellow green blue do echo one color is $color done for x do echo x = $x done More the examples by yourself 24 2110313 Operating Systems and System Programs (1/2010)
  • 25. Tutor Session - 3 Iteration Statement Chulalongkorn University (Cont) While statement while [condition] do test $var1 –opt $var2 [result] done 25 2110313 Operating Systems and System Programs (1/2010)
  • 26. Tutor Session - 3 Iteration Statement Chulalongkorn University (Cont) Example while true do who | grep u51xxx sleep 30 done More the examples by yourself x=1 while test $x -le 10 do echo x is $x x=`expr $x + 1` done 26 2110313 Operating Systems and System Programs (1/2010)
  • 27. Tutor Session - 3 See More Chulalongkorn University [1] http://www.grymoire.com/Unix/Sh.html [2] http://www.ooblick.com/text/sh/ [3] http://www.injunea.demon.co.uk/pages/page204.htm 27 2110313 Operating Systems and System Programs (1/2010)
  • 28. Tutor Session - 3 End Chulalongkorn University Question ? … Answer 28 2110313 Operating Systems and System Programs (1/2010)