091019 BZ360 bash - Colorado State...
Transcript of 091019 BZ360 bash - Colorado State...
-
1
Outline§ Basic computer architecture
§ Programs and algorithms
§ Bash scripts
§ Text editors
§ Exercise 4: scratch and scripting
-
2
-
Computers: processing and storage
Hard drive/solid-state drive: non-volatile data storage and retrieval (space measured in GB or TB).
Processor (CPU): perform computational tasks (speed measured in GHz).
Core: an independent processor.
Memory/RAM: temporary volatile storage of data (space measured in GB).
2
-
Programs and algorithms
§ Program§ A set of instructions telling a computer exactly what to do.
§ Programming language§ A language designed to provide instructions to a computer.§ Each language has specific syntax and semantics.
§ Script§ A program, often relatively short and usually written in an interpreted
language.
§ Algorithm§ A sequence of operations to be followed to solve a problem (independent of
a specific programming language).
§ Program
-
Text editors are used to write computer programs§ Text editors
§ Software for editing plain text files.
§ Used for editing configuration files, writing computer programs and scripts, etc.
§ Word processing software, such as Word and TextEdit, use formatted text as
opposed to plain text and can’t be used for writing scripts.
Mac Users: TextWrangler
PC Users: Notepad++
Linux users: gedit
5
-
Text editors
6
Syntax highlighting
Line
num
bers
File type Line breaks Word count
Bash scripts typically have .sh extension
-
Exercise 4:
§ Scratch and computer programming concepts.
§ Introduction to scripting.
7