This is a list of topics we considered while writing midterm questions. Not every item is covered on the exam.
Topics
- Commands including:
cd
,echo
,mkdir
,rmdir
,rm
,mv
,cp
,echo
,man
,head
,tail
,dirname
,basename
,uniq
(w/ and w/o-c
),wc
(w/ and w/o-l
)shift
- Absolute and relative paths
- Printing to stdout and stderr
- Output redirection, for both stdout and stderr, and to
/dev/null
- Variables, including arguments ($@, $1…) and $?
- Zero vs. non-zero return status
- And its relation to conditionals
- Basic loops and conditionals, and common unary and binary operators, as well as
&&
/||
- Pipelines of >= 4 parts
- Command substitution using
$()
- Command separation with
;
. - Cutting arbitrary fields with
cut
,-d
,-f
. No ranges. - Sort, both alphabetically, numerically, and in reverse
- Basic find with
grep
, and replace withsed
- Hashbangs,
set -e
and basic scripting bits and bobs - Permissions; especially execute permission.
- Basic
tar
usage including extraction - Symbolic links
git
, includingcommit
,push
/pull
,blame
,diff
, checkout and.gitignore
files.