1 / 4

The | Symbol

The | Symbol. Accept stdin. Accept stdin. cmd A. cmd B. cmd C. Generate stdout. Generate stderr. Generate stderr. Generate stdout. Generate stderr. Generate stdout. Example: $ ps – ef | more $ ls | more $ ls sort –r | more. wc (word count).

cody-poole
Télécharger la présentation

The | Symbol

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. The | Symbol Accept stdin Accept stdin cmd A cmd B cmd C Generate stdout Generate stderr Generate stderr Generate stdout Generate stderr Generate stdout Example: $ ps –ef | more $ ls | more $ ls sort –r | more

  2. wc (word count) Definition: Counts words, lines, and characters in a file. Syntax: wc[-lwc] [file. . ] Examples: $ wc /etc/passwd $ wc abcde fghijkl mnoqrstuvwxyz Ctrl-d ls> ls.out | wc -w Enter Enter Enter

  3. head • The head command is used to display the first N lines of a given file Examples: $ head -2 file head [-n] [filename]

  4. tail • The tail command is used to display the last N lines of a given file Examples: $ tail -10 file tail [-n] [filename]

More Related