Introduction
Announcements

Schedule
Labs
Assignments
TA office hours

Tests, exam

Topic videos
Some course notes
Extra problems
Lecture recordings

Discussion board

Grades so far

1. a) The command "speak" outputs something to the standard error. Write an sh command to capture this into a file named "speech".

b) The command "powercord" outputs something to the standard output. Write an sh command to run this command but with the output going instead to the standard error output (of the shell script in which your command appears).

Solutions:

a) speak 2>speech

b) powercord >&2
Note: '>' redirects file descriptor 1 by default, but "powercord 1>&2" is just as good an answer to this question.


[sample midterm from Winter 2011]