diff options
Diffstat (limited to 'guides/shell-workshop/shell-tut.txt')
-rw-r--r-- | guides/shell-workshop/shell-tut.txt | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/guides/shell-workshop/shell-tut.txt b/guides/shell-workshop/shell-tut.txt new file mode 100644 index 0000000..0a73cb0 --- /dev/null +++ b/guides/shell-workshop/shell-tut.txt @@ -0,0 +1,126 @@ +first steps and basic output + how shell reads input - three methods + use of "echo" built-in utility + ex: hello world +simple commands, field splitting, and quoting + ex: maybe cd, mkdir/touch, etc. +tilde and pathname expansion + ex: cd with tildes + ex: cd/mkdir/touch with pathname expansions +parameters + defining variables and expanding their values + positional parameters, special parameters, and shell variables + ex: assign variables + ex: expand and print variables and positional parameters +command substitution + ex: commands in subshells, output assigned to variables +arithmetic expansion + ex: some expressions, assignments, etc. +shell commands + revisit simple commands + command search and execution + pipelines + lists + sequential + asynchronous + AND + OR + compound commands + grouping + subshell vs current shell, shell execution environment: + open files + working directory + shell parameters + shell functions + shell options + shell aliases + if + show "test"/"[" command + while + ex: loop over positional parameters + #! /bin/sh + while [ $# -gt 0 ]; do + printf '%s\n' "$1" + shift + done + ex: read from input + until + for + case + functions +exit status +I/O redirection +built-in utilities + colon + export + break [n] + continue [n] + dot + eval + exec + exit + export + return + set + shift + unset +utilities + cat + cd + chgrp + chmod + chown + cp + date + dd + df + diff + dirname + du + echo + expr + false + file + fold + getopts + grep + head + id + kill + ln + lp + ls + mailx + mesg + mkdir + mkfifo + more + mv + nice + pr + printf + ps + pwd + read + rm + rmdir + sed + sh + sleep + sort + stty + tail + test + time + touch + tr + true + uniq + wc + who + +example scripts: + screen-batt + /usr/local/lib/pjrand.sh and /usr/local/bin/screensaver + /bin/which of Debian (ex. of IFS) + changelog-gen |