Difference between revisions of "Tutorial 10 - Shell Scripting - Part 1"

From CDOT Wiki
Jump to: navigation, search
(Tutorial Reference Material)
Line 29: Line 29:
  
 
|colspan="2" style="font-size:16px;font-weight:bold;border-bottom: thin solid black;border-spacing:0px;padding-left:15px;"|Linux Command/Shortcut Reference<br>
 
|colspan="2" style="font-size:16px;font-weight:bold;border-bottom: thin solid black;border-spacing:0px;padding-left:15px;"|Linux Command/Shortcut Reference<br>
 
|colspan="1" style="font-size:16px;font-weight:bold;border-bottom: thin solid black;border-spacing:0px;padding-left:15px;"|YouTube Videos<br>
 
  
 
|- valign="top" style="padding-left:15px;"
 
|- valign="top" style="padding-left:15px;"
Line 55: Line 53:
 
* [https://www.cyberciti.biz/faq/bash-for-loop/#:~:text=A%20'for%20loop'%20is%20a,files%20using%20a%20for%20loop. for loop]
 
* [https://www.cyberciti.biz/faq/bash-for-loop/#:~:text=A%20'for%20loop'%20is%20a,files%20using%20a%20for%20loop. for loop]
  
|colspan="1" style="padding-left:15px;" width="30%"|Instructional Videos:<ul><li>[https://www.youtube.com/watch?v=kxEP-KUhOSg&list=PLU1b1f-2Oe90TuYfifnWulINjMv_Wr16N&index=5 Bash Shell Scripting - Part 1]</li><li>[https://www.youtube.com/watch?v=cQepf9fY6cE Creating and Running a Shell Script]</li></ul>
 
 
|}
 
|}
  

Revision as of 13:34, 14 November 2021

Content under construction

INTRODUCTION TO SHELL SCRIPTING

Main Objectives of this Practice Tutorial

  • Plan and create a Shell Script
  • Explain the purpose of the she-bang line contained at the top of a shell script.
  • Set permissions and execute shell scripts.
  • Use environment and user-defined variables in shell scripts.
  • Use Command Substitution and Math Operations in shell scripts
  • Explain the purpose of the $? exit status and the test command.
  • Use if and if-else logic statements in shell scripts.
  • Use a for loop statement with a list in shell scripts.

Tutorial Reference Material

Course Notes
Linux Command/Shortcut Reference
Course Notes:


Shell Scripting

Variables

Commands / Techniques

Control Flow Statements

INVESTIGATION 1: CREATING A SHELL SCRIPT

INVESTIGATION 2: USING VARIABLES IN SHELL SCRIPTS

INVESTIGATION 3: COMMAND SUBSTITUTION / MATH OPERATIONS

INVESTIGATION 4: USING CONTROL FLOW STATEMENTS IN SHELL SCRIPTS

LINUX PRACTICE QUESTIONS