1 / 4

Stdin, stdout and stderr

Stdin, stdout and stderr. File Device File Descriptor stdin 0 stdout 1 stderr 2. < - Redirecting Inputs. Any redirection that reads its input from stdin can have its input redirected to come from another file. Example $ cat remind

haven
Download Presentation

Stdin, stdout and stderr

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stdin, stdout and stderr File Device File Descriptor stdin 0 stdout 1 stderr 2

  2. < - Redirecting Inputs Any redirection that reads its input from stdin can have its input redirected to come from another file. Example $ cat remind Your mother’s birthday is November 5. $ mail user3 < remind $ mail From user3 Mon July 15 11:30 EDT 1993 Your mother’s birthday is November 5. Enter Enter Enter

  3. > And >> - Redirecting Output Any command that produces output to stdout can have its output redirected to another file. Example $ date > date.out $ who > date.out $ who >> who.log $ ls >> who.log Enter Enter Enter Enter

  4. 2> and 2>> - Redirecting Errors Any command that produces error messages to stderr can have those messages redirected to another file. Example $ cp 2> cp.err $ cp 2>> cp.err $ cat cp.err Enter Enter Enter

More Related