Page 133 - slides.dvi
P. 133

•
                           •
                                                                             •
                                                     •
                                  •
               •
   Unix
                                                            –
                                                                 –
                                                                       –
                                                                                          –
                                                                                               –
                                                                                     –
   Case
                      can
                                                                       ls
                           Most
                                                                 ls
                                              ls
                                                            sh
                                         wc
                                                                                                      Every
                                                     Actual
                                  Pipeline
   Study—
                                                                                               stdin:
                                                                                                               Standard
                                                                             Normally
                      build
                                                                                     stderr:
                                                                                          stdout:
                                                     file
                                  is
                           Unix
               Redirection
                                                                                                      process
   Processes
                                                     not
                                                                                                               I/O
                                                                                               where
               can
                                                                                     where
                      almost
                                  better
                                                                                          where
                                                                                                      has
                                                                                               to
                                         <temp.txt
                                                                             inherited
                                                                                     to
                                              >temp.txt;
                                                                                          to
                                                     always
               cause
                           commands
                                                                       >listing.txt
                                  (e.g.
                                                            <commands.sh.
                                                                 >&listing.txt
                                                                                               read
                                                                                                      three
                                                                             from
                                                                                     send
                                                                                          send
                           are
                                  ls
                      arbitrarily
                                                                                                      fds
               some
                                  |
                                                                                               input
                                         >results
                                                                                                      on
                                                                             parent,
                                  wc
                           filters,
                                                                                          output.
                                                     appropriate;
                                                                                               from.
                      complex
                                                                             but
                           i.e.
                                                                                     diagnostics.
               buffering
                                                     e.g.
                                                                                                      creation:
                                                                             shell
                           read
                                  >results)
                      command
                           from
                                                                             allows
               subtleties.
                                                     consider:
                      lines.
                           stdin
                           and
                                                                             redirection
                           output
                                                                             to/from
                           to
                                                                             a
                                                                             file,
                           stdout
                           ⇒
                                                                             e.g.:
   129
   128   129   130   131   132   133   134   135   136   137   138