Vertical bar

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by JakeVortex (talk | contribs) at 19:15, 7 May 2004 (first cut ... edits in progress). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Vertical bar, Pipe ("|" or "¦") is the name of the ASCII character at position 124 (decimal). The character is depicted as either a solid vertical bar or a vertical bar with a break in the middle (broken bar). The character is usually depicted as a broken bar on IBM PC keyboards to distinguish it from other characters.


Usage:

Unix

A pipe is an operating system mechanism originating in Unix, which allows the user to direct the output of one shell command through another command. See Pipe (Unix).

Disjunction

In the C, perl, and many others, it is used to designate bitwise or a|b or doubled up logical or a||b.

Regular Expression]]

In regular expressions, the vertical bar indicates alternation. E.g., grep 'foo|bar' matches lines containing 'foo' or 'bar'.

Wiki markup

The vertical bar is used in links to separate a link from the displayed text. E.g., [[c programming language|C]] displays as C.