https://github.com/linyimin0812/shell-learning
shell programming learning record
https://github.com/linyimin0812/shell-learning
bash shell
Last synced: 2 months ago
JSON representation
shell programming learning record
- Host: GitHub
- URL: https://github.com/linyimin0812/shell-learning
- Owner: linyimin0812
- Created: 2018-10-24T02:38:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-05T15:53:08.000Z (about 7 years ago)
- Last Synced: 2026-04-30T13:34:31.956Z (2 months ago)
- Topics: bash, shell
- Language: Shell
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shell-learning
shell programming learning record
## Part 1 Introduction
[Chapter 1 Introduction](docs/Part-1-Introduction/Chapter-1-Introduction.md)
## Part 2 Basic
### Docs
[Chapter 2 Spaecial Character](docs/Part-2-Basic/Chapter-2-Special-Characters.md)
[Chapter 3 Introduction to varialbes and parameters](docs/Part-2-Basic/Chapter-3-Introduction-to-Variables-and-Parameters.md)
[Chapter 4 Quoting](docs/Part-2-Basic/Chapter-4-Quoting.md)
[Chapter 5 Exit and Exit Status](docs/Part-2-Basic/Chapter-5-Exit-and-Exit-Status.md)
[Chapter 6 Tests](docs/Part-2-Basic/Chapter-6-Tests.md)
### Example Script
[example 1: arithmetic-and-string-comparison](scripts/Part-2-Basic/arithmetic-and-string-comparison.sh)
[example 2: code-blocks-Input-redirection](scripts/Part-2-Basic/code-blocks-Input-redirection.sh)
[example 3: code-blocks-output-redirection](scripts/Part-2-Basic/code-blocks-output-redirection.sh)
[example 4: echo-wired-variable](scripts/Part-2-Basic/echo-wired-variable.sh)
[example 5: exit-and-exit-status](scripts/Part-2-Basic/exit-and-exit-status.sh)
[example 6: file-test-operator](scripts/Part-2-Basic/file-test-operator.sh)
[example 7: integer-or-string](scripts/Part-2-Basic/integer-or-string.sh)
[example 8: negating-a-condition-using-!](scripts/Part-2-Basic/negating-a-condition-using-!.sh)
[example 9: plain-variable-assignmnet](scripts/Part-2-Basic/plain-variable-assignmnet.sh)
[example 10: positional-parameters](scripts/Part-2-Basic/positional-parameters.sh)
[example 11: quotes-split](scripts/Part-2-Basic/quotes-split.sh)
[example 12: testing-whether-a-string-is-null](scripts/Part-2-Basic/testing-whether-a-string-is-null.sh)
[example 13: using-shift](scripts/Part-2-Basic/using-shift.sh)
[example 14: variable-assignmnet-plain-fancy](scripts/Part-2-Basic/variable-assignmnet-plain-fancy.sh)
[example 15: varible-assignment-substitution](scripts/Part-2-Basic/varible-assignment-substitution.sh)
## Part 3 Beyond the basic
### Docs
[Chapter 7 Another Look at Variables](docs/Part-3-Beyond-the-Basic/Chapter-7-Another-Look-at-Variable.md)
[Chapter 8 Manipulating Variables](docs/Part-3-Beyond-the-Basic/Chapter-8-Manipulating-Variables.md)
[Chapter 9 Loops](docs/Part-3-Beyond-the-Basic/Chapter-9-Loops.md)
[Chapter 10 Command Substitution](docs/Part-3-Beyond-the-Basic/Chapter-10-Command-Substitution.md)
### Example Script
[example 1: IFS-and-Whitespace](scripts/Part-3-Beyond-the-Basic/IFS-and-Whitespace.sh)
[example 2: reply](scripts/Part-3-Beyond-the-Basic/reply.sh)
[example 3: second](scripts/Part-3-Beyond-the-Basic/second.sh)
[example 4: timeout](scripts/Part-3-Beyond-the-Basic/timeout.sh)
[example 5: uid](scripts/Part-3-Beyond-the-Basic/am-i-root.sh)
[example 6: $* and $@](scripts/Part-3-Beyond-the-Basic/inconsistent-internal-variables-behavior.sh)
[example 7 substring extrction](scripts/Part-3-Beyond-the-Basic/substring-extraction.sh)
[example 8 generating an 8-character random string](scripts/Part-3-Beyond-the-Basic/generating-an-8-character-random-string.sh)
[example 9 change suffix name](scripts/Part-3-Beyond-the-Basic/change-suffix-name.sh)
[example 10 substring replacement](scripts/Part-3-Beyond-the-Basic/change-suffix-name.sh)
[example 11 default value](scripts/Part-3-Beyond-the-Basic/default-value.sh)
[example 12 simple for loop](scripts/Part-3-Beyond-the-Basic/simple-for-loops.sh)
[example 13 two parameters in each elements](scripts/Part-3-Beyond-the-Basic/two-parameters-in-each-elements.sh)
[example 14 operating a file list contained in a variable](scripts/Part-3-Beyond-the-Basic/operating-a-file-list-contained-in-a-variable.sh)
[example 15 operating on a p](scripts/Part-3-Beyond-the-Basic/operating-on-a-parameterized-file-list.sh)
[Example 16 mssing list in a for loop](scripts/Part-3-Beyond-the-Basic/mssing-list-in-a-loop.sh)
[Example 17 generating list with command substitution](scripts/Part-3-Beyond-the-Basic/generating-list-with-command-substitution.sh)
[Example 18 effects of continue and break in a loop](scripts/Part-3-Beyond-the-Basic/break-and-continue-in-a-loop.sh)
[Example 19 Using case](scripts/Part-3-Beyond-the-Basic/using-case.sh)
[Example 20 Creating menus using select](scripts/Part-3-Beyond-the-Basic/creating-menus-using-select.sh)
[Example 21 Generating a variable from a loop](scripts/Part-3-Beyond-the-Basic/generating-a-variable-from-a-loop.sh)
## Part-4-Commands
### Docs
[Chapter-11-Commands](docs/Part-4-Commands/Chapter-11-Internal-Commands-and-Buildins.md)
### scripts
[Example 1 script spawns multiple instances of itself](scripts/Part-4-Commands/script-spawns-multiple-instances-of-itself.sh)
[Example 2 printf in action](scripts/Part-4-Commands/printf-in-action.sh)
[Example 3 variables assignment using read](scripts/Part-4-Commands/variable-assignment-using-read.sh)
[Example 4 letting let do arthmetic](scripts/Part-4-Commands/letting-let-do-arithmetic.sh)
[Example 5 let command return a surprising exit status](scripts/Part-4-Commands/let-command-return-a-surprising-exit-status.sh)
[Example 6 Using set with positional parameters](scripts/Part-4-Commands/using-set-with-positional-parameters.sh)
[Example 7 unsetting a variable](scripts/Part-4-Commands/unsetting-a-variable.sh)