Schedule
Labs
Assignments
TA office hours
Topic videos
Some course notes
Extra problems
Lecture recordings
echo is a good command cat is a bad command
a) What is the output of the following shell script?
if grep good file then echo yes else echo no fi
echo is a good command yes
(if you don't understand why, try it and experiment!)
b) What is the output of the following (highly unusual) shell script?
if `grep good file` then echo yes else echo no fi
is a good command yes
(again, if you don't understand why, try it and experiment!)