Course Homepage

HW11

  1. What files comprise standard I/O?
  2. Write a Bash command that uses grep to find lines matching “hello” from standard in, redirected from a file called “my.in”.
  3. Why doesn’t a program have to open the standard out file?
  4. What system call duplicates file descriptors? (There is more than one answer.)
  5. Write a snippet of C code (not Bash code!) that redirects a process’s standard out to a file called “my.out”.