mirror of
https://github.com/opsschool/curriculum.git
synced 2026-01-15 12:15:03 +00:00
65 lines
703 B
ReStructuredText
65 lines
703 B
ReStructuredText
Programming 101
|
|
***************
|
|
|
|
Shell scripting basics
|
|
======================
|
|
|
|
“#!/usr/bin/env bash” vs. “#!/bin/bash” vs “#!/bin/sh”(portability
|
|
considerations)
|
|
|
|
Variables
|
|
---------
|
|
|
|
user-defined
|
|
built-in
|
|
|
|
Control Statements
|
|
------------------
|
|
|
|
tests / conditionals
|
|
loops
|
|
|
|
functions
|
|
---------
|
|
|
|
arrays
|
|
------
|
|
|
|
style
|
|
-----
|
|
|
|
Redirection
|
|
-----------
|
|
|
|
I/O
|
|
---
|
|
|
|
Pipes
|
|
-----
|
|
|
|
stderr vs. stdout
|
|
------------------
|
|
|
|
/dev/null and /dev/zero
|
|
-----------------------
|
|
|
|
Regular Expressions
|
|
===================
|
|
|
|
Sed & awk
|
|
=========
|
|
|
|
GIGO
|
|
====
|
|
|
|
Validating input
|
|
----------------
|
|
|
|
Validating output
|
|
-----------------
|
|
|
|
Trapping & handling exceptions with grace
|
|
-----------------------------------------
|
|
|
|
|