Vertical bar

From Wikipedia, the free encyclopedia

v  d  e
Punctuation

apostrophe ( ', )
brackets ( ), [ ], { }, < >
colon ( : )
comma ( , )
dashes ( , , , )
ellipsis ( , ... )
exclamation mark ( ! )
full stop/period ( . )
guillemets ( « » )
hyphen ( -, )
question mark ( ? )
quotation marks ( ‘ ’, “ ” )
semicolon ( ; )
slash/stroke ( / )
solidus ( )

Interword separation

spaces ( ) () ()
interpunct ( · )

General typography

ampersand ( & )
asterisk ( * )
at ( @ )
backslash ( \ )
bullet ( )
caret ( ^ )
currency ( ¤ ) ¢, $, , £, ¥, ,
dagger ( ) ( )
degree ( ° )
emoticons :-)
inverted exclamation point ( ¡ )
inverted question mark ( ¿ )
number sign ( # )
percent and related signs
( %, ‰, ‱ )
pilcrow ( )
prime ( )
section sign ( § )
tilde/swung dash ( ~ )
umlaut/diaeresis ( ¨ )
underscore/understrike ( _ )
vertical/pipe/broken bar ( |, ¦ )

Uncommon typography

asterism ( )
lozenge ( )
interrobang ( )
irony mark ( ؟ )
reference mark ( )
sarcasm mark

Note: "broken bar" and the glyph "¦" redirect here.

Vertical bar, verti-bar, vertical line, divider line, or pipe is the name of the character (|).

Broken bar (¦) is a separate character.

The typical keyboard layout used in the United Kingdom features separate keys for vertical bar and broken bar, however most UK keyboard drivers today map both keys onto the vertical bar, as broken bar has hardly any practical application. Keyboards in other countries do not make this distinction, and there, the vertical bar character is often depicted as a broken bar, to distinguish it from the "I" (uppercase "i") character.

Contents

The name pipe for the character "|" was a natural consequence of its usage in Unix shells, where it is used to notate the usage of the unix pipeline construct.

The vertical bar is used as a mathematical symbol in

  • absolute value: | x | , read "the absolute value of x".
  • norms: \|(x_1,x_2)\|, read "the norm of x sub one, x sub two"; though Unicode also provides a special double vertical line symbol U+2016: x
  • set definition: {x | x < 2}, read "the set of x such that x is less than two". Often sets are written with a colon ':' rather than a vertical bar.
  • conditional probability: P(X | Y), read "the probability of X given Y".
  • divisibility: a | b, read "a divides b".
  • the Sheffer stroke.
  • evaluate: a + 3 | a = 4, read "a plus 3 evaluated for when a equals 4", or 4 + 3 = 7.

In Backus-Naur form the expression consists of sequences of symbols and/or sequences separated by '|', indicating a choice, the whole being a possible substitution for the symbol on the left.

 ::= |

A pipe is an inter-process communication mechanism originating in Unix which allows the output (standard out and, optionally, standard error) of one process to be used as input (standard in) to another. In this way, a series of commands can be "piped" together. This provides skilled practioners the ability to quickly perform complex processing on the command line or as part of a UNIX shell script ("batch file"). In most Unix shells (command interpreters), this is represented by the vertical bar character.

e.g. Piped UNIX commands: egrep -i 'blair' filename.log | sed 's/be clear/lie/g' | more

Traditionally, the piping capability in UNIX is provided by the "fork and exec" feature of UNIX operating systems. The UNIX shell forks off a copy of itself for each command, connecting the input of each to the output of the next. When processing large amounts of data, all processes in the pipeline will typically be active at the same time (within the limits of the hardware used).

This feature is found in later versions of Microsoft DOS (and hence Microsoft Windows) as well, however, the smaller DOS command set, the limited command functionality and crude shell capabilities means that piping is less useful in the more visual Microsoft Windows environment. However Cygwin and MKS toolkit provide complete UNIX tool sets for the Windows environment, including UNIX shells (BASH & Korn shell respectively) which provide the same powerful piping capabilities as UNIX.

e.g. Piped DOS command: type *.txt | more

In regular expression syntax, the pipe indicates alternation (i.e. logical OR). For example: the Unix command grep -E 'foo|bar' matches lines containing 'foo' or 'bar'.

In many programming languages, it is used to designate the logic operation or, either bitwise or or logical or.

Specifically, in C and other languages following C syntax conventions, such as C++, Perl, Java and C#, (a | b) denotes a bitwise or; whilst a double vertical bar (a || b) denotes a (short-circuited) logical or.

In PL/I and SQL, the operator "||" denotes string concatenation.

Although not as common as commas or tabs, the vertical bar can be used as a delimiter in a flat file. An example of a pipe-delimited standard data format is LEDES 1998B.

In calculi of communicating processes (like Pi-calculus), the vertical bar is used to indicate that processes execute in parallel.

As a short cut, the vertical bar combined with a colon (:|) while typing a post comes up as an indifferent smiley in the actual post.

In the Khoisan languages, the pipe is used to write the dental click.

The vertical bar is made use of in Wiki markup:

  1. to separate parameters in MediaWiki templates;
  2. to pipe links, displaying a token different from the article title;
  3. to separate cells in table layout.

Despite the vertical bar being an accessible keystroke on typical North American and UK keyboards, there are cases where Web designers, Wiki editors, computer programmers, and others need to encode the vertical bar — usually because the vertical bar is a special symbol in their source code and yet a literal vertical bar needs to be displayed to the end user.

Set forth in 1963, American Standard Code for Information Interchange (ASCII-1963), one of the first widely used character maps only had 69 display ("printable") characters; and A–Z, and 0–9 accounts for 36 of those characters. Vertical bar ("|") is the ASCII-1963 character at position 124 (decimal). Broken bar ("¦") is not part of the ASCII character set (any version), but a separate character that appeared (along with vertical bar) first in the EBCDIC family of character sets, and was copied from there into ISO 8859-1 and Unicode. The typical computer keyboard used in the United Kingdom features separate keys for "vertical bar" and "broken bar", however most UK keyboard drivers today map both keys onto the ASCII character "vertical bar", as "broken bar" has hardly any practical application.

Unicode

hexadecimal (base-16): 007C

UTF-8

hexadecimal (base-16): 7C

ASCII

decimal (base-10): 124, or hexadecimal (base-16): 7C

ISO/IEC 8859-1

hexadecimal (base-16): 7C

Shift-JIS Men-Ku-Ten

1-01-35

EBCDIC (CCSID 500 variant)

hexadecimal (base-16): BB

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.