|
Individuals requiring a mastery of the command line interface to the UNIX operating system. This includes system administrators, programmers, and power users.
umask Command
select
let and (( )))
expr For String Matching
read Command)
| Note1 | Optional topic. Remove for the three day version. |
Upon completion of this course, the student will be able to write Bash Shell scripts using the following features and more:
I/O redirection, pipes, and command and variable substitution,
Passing parameters to shell scripts and interpreting their meaning,
Controlling the program flow using conditionals and loops,
Catch and interpret Control-C and other asynchronous events, and
Apply debugging techniques to quickly locate coding errors.
Shell scripting is equal parts of running commands and processing the results generated by those commands. This course covers the most important of the text processing commands that are frequently used in efficient shell scripts, and combines that with the built-in control functions of the shell to make them fast and effective. Each chapter includes discussion of when to use each feature, so that students gain an understanding of what works best in a particular situation. Best practices are described throughout the course.
Students are invited to bring their current ideas and questions to the classroom for discussion. Case studies, lecture, group problem solving, and online laboratories will be used. Students will be encouraged to enhance their skills utilizing the techniques presented through classroom problem solving and controlled online workshops.
Completion of an Introduction to Unix or similar course, and six months of command line experience on a Unix/Unix-like operating system. See below for a quick quiz to determine if you're ready for this fast-paced course.
Programming skills are not required, but are helpful.
Are you ready for this course? If you can't immediately answer the following questions (no more than ten seconds of time to think about each answer!), then you should consider taking an Introduction to Unix/Linux course and practicing your command line skills prior to attending this course.
The ls command normally displays the contents of whatever
directory is provided on the command line. What option turns OFF
the display of a directory's contents? (So the output would consist of
one line of data with a d in column zero.)
The cat command is normally used to display the contents of a file,
but it can also add line numbers to the output, display tabs as ^I
characters, add end-of-line markers, and other functions. Name at least
two valid option letters to the cat command and describe what they do.
The tail command is a staple of the Unix environment. It can be
executed with the -n option followed by a positive or negative
number. What do these numbers represent by default and what is the
difference between the plus sign prefix and the minus sign prefix?
Describe what the following command does in 25 words or less (you can
take ten seconds for each command in the pipe, and you're allowed to guess
at which data is being extracted from the ps output):
ps -eaf | cut -c56- | tail -n +2 | sort -u
Which of these command groups produce nonsense results (you get ten seconds per command group):
ps -eaf | sort -k 1.56
ls -l /var/spool/at > /tmp/frank | wc -l
echo "%r" > format
date +$(cat format)
echo "+%r" > format
var=$(date $(cat format))
If you didn't get at least three of the above questions correct immediately, you're not ready for this course.
The answers are:
-d
-n/-t/-e/-v and some versions of the cat command
have -b and -s
Number of lines. A positive number begins counting from the beginning of the file and a negative number counts backwards from the end of the file.
Creates an alphabetical list of command lines running on the
system (removing duplicates). This assumes that ps -f prints the
command line beginning in column 56.
A, C, and D are fine. B has the problem.