Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson 2 1.Commands 2.Filename Substitution 3.I/O Redirection 4.Command Grouping 5.Shell Responisibilites Review of the Basics.

Similar presentations


Presentation on theme: "Lesson 2 1.Commands 2.Filename Substitution 3.I/O Redirection 4.Command Grouping 5.Shell Responisibilites Review of the Basics."— Presentation transcript:

1 Lesson 2 1.Commands 2.Filename Substitution 3.I/O Redirection 4.Command Grouping 5.Shell Responisibilites Review of the Basics

2 Lesson 2 Commands cat cd cp date echo ln ls mkdir mv ps pwd rm rmdir sort wc who

3 Lesson 2 Filename Substitution Also called filename expansion or “globbing” Special characters * - matches any number of characters including none ? - matches any single character [ ] - matches any one character within the brackets [! ] - matches any character not within the brackets Example: [a-z]*[!0-9] matches any filenames beginning with a letter and not ending in a digit.

4 Lesson 2 I/O Redirection stdin, stdout, stderr 012 /dev/tty keyboard screen env 0123…0123… BASH process Argument List

5 Lesson 2 Command Grouping Run commands sequentially cmd1 ; cmd2 ; cmd3 … Run commands in parallel cmd1 & cmd2 & cmd3 … Run commands in a subshell (cmd1 ; cmd2; cmd3 … ) Run commands conditionally cmd1 && cmd2 # run cmd2 only if cmd1 is successful cmd1 || cmd2 # run cmd2 only if cmd1 fails

6 Lesson 2 Shell Features program execution filename expansion variable sustitution command substitution I/O redirection environment control interpreted programming language command history, aliases, commandline editing

7 Lesson 2 Commandline Parsing 1.Scan line for shell metacharacters 2.Perform variable and command substitution 3.Perform filename expansion (globbing) 4.Handle I/O redirection 5.Determine execution type


Download ppt "Lesson 2 1.Commands 2.Filename Substitution 3.I/O Redirection 4.Command Grouping 5.Shell Responisibilites Review of the Basics."

Similar presentations


Ads by Google