# What do you call this | character?

**URL:** <https://boards.straightdope.com/t/what-do-you-call-this-character/585426>\
**Category:** Factual Questions\
**Created:** [June 14, 2011, 2:24pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426 "2011-06-14T14:24:18Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [June 14, 2011, 4:47pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/21 "2011-06-14T16:47:22Z")

</div>

Pipe is what it is called only in the context of shell programming. In that case it is the name of the operator, not the character. As noted it can also mean “or”. It can also be used as a delimiter, or a number of other things. The character itself is usually called “vertical bar.” (Similarly the hyphen character can mean “unary minus” but that’s not what you call the character.)

---

<div class="post-metadata">

**Author:** ![Lasciel](https://avatars.discourse-cdn.com/v4/letter/l/e79b87/32.png) [@Lasciel](https://boards.straightdope.com/u/Lasciel)\
**Post date:** [June 14, 2011, 5:05pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/22 "2011-06-14T17:05:42Z")

</div>

Not a programmer (unless you count MARC records) and it’s been called a “bar” or “vertical bar” in three different textbooks (library science) referencing how it is used.

I mainly called it “that damn annoying character my prof wouldn’t let me substitute ! for in our class projects.”

---

<div class="post-metadata">

**Author:** ![robert\_columbia](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@robert\_columbia](https://boards.straightdope.com/u/robert_columbia)\
**Post date:** [June 14, 2011, 5:06pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/23 "2011-06-14T17:06:30Z")

</div>

> [@CookingWithGas](#):
>
> Pipe is what it is called only in the context of shell programming. In that case it is the name of the operator, not the character. As noted it can also mean “or”. It can also be used as a delimiter, or a number of other things. The character itself is usually called “vertical bar.” (Similarly the hyphen character can mean “unary minus” but that’s not what you call the character.)

I’ve considered “pipe” to be a valid name of the character. It is true that it represents a piping operator in shell scripting (UNIX and DOS, and probably more), but then sometimes a use of a character becomes its name, like “@” being called “at” or “%” being called “percent”. “%” can also be a wildcard in some contexts.

In C, it means “OR”. A single “|” means bitwise or, and a double (“||”) means boolean OR.

C++, Java, C#, and/or languages have inherited this to some extent.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 14, 2011, 5:55pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/24 "2011-06-14T17:55:36Z")

</div>

Quoth **don’t ask** :

> [@](#):
>
> Pipe, but just about everywhere you can substitute !

I know of no context where these two characters have an equivalent meaning. The bash shell appears to not ascribe any significance at all to a !, and many environments where | means “or”, ! means “not”. I don’t doubt that there’s some environment where they do have the same, or closely similar, meanings, but I don’t have any idea what that environment would be.

And the original purpose of the character was just to be a vertical line, to be used in drawing screen graphics. But programmers hate to let a perfectly good character sit idle, so other uses were found for it.

---

<div class="post-metadata">

**Author:** ![KneadToKnow](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kneadtoknow/32/3999_2.png) [@KneadToKnow](https://boards.straightdope.com/u/KneadToKnow)\
**Post date:** [June 14, 2011, 6:16pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/25 "2011-06-14T18:16:17Z")

</div>

> [@Francis\_Vaughan](#):
>
> |
> 
> Ceci n’est pas une pipe

Applause.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 14, 2011, 6:25pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/26 "2011-06-14T18:25:09Z")

</div>

> [@](#):
>
> pipe  
> One of the redirection operators from DOS (and probably earlier)

Not to quibble (and yes you did write “probably earlier”) but to event hint at a DOS origin for pipe is zanier than the Kenyan birth theory. :smack:

---

<div class="post-metadata">

**Author:** ![Leo\_Bloom](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/leo_bloom/32/10377_2.png) [@Leo\_Bloom](https://boards.straightdope.com/u/Leo_Bloom)\
**Post date:** [June 14, 2011, 8:07pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/27 "2011-06-14T20:07:06Z")

</div>

> [@Francis\_Vaughan](#):
>
> |
> 
> Ceci n’est pas une pipe

:)! The best I’ve heard/seen on GQ.

---

<div class="post-metadata">

**Author:** ![Leo\_Bloom](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/leo_bloom/32/10377_2.png) [@Leo\_Bloom](https://boards.straightdope.com/u/Leo_Bloom)\
**Post date:** [June 14, 2011, 8:10pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/28 "2011-06-14T20:10:46Z")

</div>

It either means “on” or “off” on some early IBM PCs, a famous example of one of the worst icons ever devised.

I still don’t know which state it means.

---

<div class="post-metadata">

**Author:** ![Tastes\_of\_Chocolate](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tastes_of_chocolate/32/3232_2.png) [@Tastes\_of\_Chocolate](https://boards.straightdope.com/u/Tastes_of_Chocolate)\
**Post date:** [June 14, 2011, 8:18pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/29 "2011-06-14T20:18:09Z")

</div>

> [@Leo\_Bloom](#):
>
> It either means “on” or “off” on some early IBM PCs, a famous example of one of the worst icons ever devised.
> 
> I still don’t know which state it means.

It still means that on all of the computer power supply switches that I see. |/O

---

<div class="post-metadata">

**Author:** ![Saint\_Cad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saint_cad/32/18907_2.png) [@Saint\_Cad](https://boards.straightdope.com/u/Saint_Cad)\
**Post date:** [June 14, 2011, 8:21pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/30 "2011-06-14T20:21:49Z")

</div>

> [@septimus](#):
>
> Not to quibble (and yes you did write “probably earlier”) but to event hint at a DOS origin for pipe is zanier than the Kenyan birth theory. :smack:

I know he claims to be from UNIX but we don’t really know until | shows us his long-form birth certificate.

---

<div class="post-metadata">

**Author:** ![mlees](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@mlees](https://boards.straightdope.com/u/mlees)\
**Post date:** [June 14, 2011, 8:24pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/31 "2011-06-14T20:24:38Z")

</div>

Huh. The character on the keyboard key is two distinct lines, upright, one above the other. But on this board, it comes out as a single solid line: |, taller than I, 1, l.

---

<div class="post-metadata">

**Author:** ![KneadToKnow](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kneadtoknow/32/3999_2.png) [@KneadToKnow](https://boards.straightdope.com/u/KneadToKnow)\
**Post date:** [June 14, 2011, 8:24pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/32 "2011-06-14T20:24:50Z")

</div>

> [@Leo\_Bloom](#):
>
> It either means “on” or “off” on some early IBM PCs, a famous example of one of the worst icons ever devised.
> 
> I still don’t know which state it means.

Paired with a circular icon, these symbols were intended as universal symbols for 1 and 0, representing the binary state of a power switch: 1 for on (electricity flowing) and 0 for off (electricity not flowing).

It’s ridiculously obvious for a computer power switch.

Thing is, most modern computers have done away with actual power switches and now have power buttons, which are just relays\* which activate circuitry on the motherboard. Since all they do now is toggle the on/off state of the computer, they have switched to [a combined symbol](http://thumbs1.ebaystatic.com/m/mSXslN34wD3r8gLPON1kQaA/140.jpg).

\*I’m probably not using that term in the correct electrical engineering sense.

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [June 14, 2011, 9:23pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/33 "2011-06-14T21:23:01Z")

</div>

> [@friedo](#):
>
> The use of | as a boolean OR predates Google by about a billion years.

I have never seen it used for the Boolean OR. It is the Scheffer stroke (which is the Boolean NOR ). Scheffer discovered that it this one operation (and a number of equations) suffices to define a Boolean algebra. You can also use Boolean NAND. Yes, it is called pipe in CS, but I call it stroke.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 15, 2011, 7:09am UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/34 "2011-06-15T07:09:31Z")

</div>

I’ve hit the | key many tens of thousands of times writing C code, and almost as many times for piping in a Unix shell (as well as some thousands of times just in ‘egrep’), yet AFAIR I never gave it a name nor thought it needed one! I might have said “No, pipe it through tee” once or twice when looking over someone’s shoulder, but I can’t recall ever calling the | anything special, except perhaps “the vertical line.”

BTW, last time I looked (which was when Reagan was still President), the Microsoft command  
floog | blah  
was implemented as  
floog \> tempfile; blah \< tempfile  
which prevents many of my uses for piping: when the complete tempfile would take too much time or space to fully create.

That Microsoft’s “pipe”, which appeared some years after MS-Dos 1.0 and more than a decade after Unix’ pipe, was so incapable is one of many _many **many** _ reasons why I think anyone pretending to compare Mr. Gates’ money-making toy to an Operating System is (check forum) mentally challenged.

---

<div class="post-metadata">

**Author:** ![Autolycus](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@Autolycus](https://boards.straightdope.com/u/Autolycus)\
**Post date:** [June 15, 2011, 8:37am UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/35 "2011-06-15T08:37:54Z")

</div>

> [@Francis\_Vaughan](#):
>
> |
> 
> Ceci n’est pas une pipe

I just braingasmed. Thank you.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [June 15, 2011, 12:39pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/36 "2011-06-15T12:39:20Z")

</div>

> [@Hari\_Seldon](#):
>
> I have never seen it used for the Boolean OR. It is the Scheffer stroke (which is the Boolean NOR ). Scheffer discovered that it this one operation (and a number of equations) suffices to define a Boolean algebra. You can also use Boolean NAND. Yes, it is called pipe in CS, but I call it stroke.

| is used for boolean OR as far back as BCPL (and probably farther) and has remained such in every derived programming language since, including B, C, C++, C#, ObjC, D, Java, Perl, PHP and JavaScript, to name a few. (Those that follow the C convention will use | for bitwise and || for logical.)

---

<div class="post-metadata">

**Author:** ![CookingWithGas](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/cookingwithgas/32/485_2.png) [@CookingWithGas](https://boards.straightdope.com/u/CookingWithGas)\
**Post date:** [June 15, 2011, 12:41pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/37 "2011-06-15T12:41:05Z")

</div>

> [@septimus](#):
>
> That Microsoft’s “pipe”, which appeared some years after MS-Dos 1.0 and more than a decade after Unix’ pipe, was so incapable is one of many _many **many** _ reasons why I think anyone pretending to compare Mr. Gates’ money-making toy to an Operating System is (check forum) mentally challenged.

I don’t have a position one way or the other on the value of DOS but I just want to point out that the shell language is only one aspect of an OS.

---

<div class="post-metadata">

**Author:** ![unclelem](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@unclelem](https://boards.straightdope.com/u/unclelem)\
**Post date:** [June 15, 2011, 1:30pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/38 "2011-06-15T13:30:51Z")

</div>

In my formative years as a programmer I recall this character being called “stile” (like the ladder you use to cross a fence - not “style” like a fashion statement) - though the people I worked with were also heavily influenced by APL.

APL had a concept of overstriking two characters to form a compound character - and some of these compound characters were basically just named for the two characters (so a circle overstruck with a stile was circle-stile).

These compound characters exist in the unicode character set and still have the stile name associated with them.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [June 15, 2011, 4:07pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/39 "2011-06-15T16:07:41Z")

</div>

> [@CookingWithGas](#):
>
> I don’t have a position one way or the other on the value of DOS but I just want to point out that the shell language is only one aspect of an OS.

Let’s avoid confusion here. My comment about DOS’s pipe had absolutely nothing to do with any command language or its syntax. It is their implementation of pipe (letting writer run to completion before starting reader) which boggles one’s imagination. Especially considering that Linux was built from scratch by a few hobbyists, while Microsoft’s budget is larger than that of some countries.

---

<div class="post-metadata">

**Author:** ![robert\_columbia](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@robert\_columbia](https://boards.straightdope.com/u/robert_columbia)\
**Post date:** [June 15, 2011, 4:26pm UTC](https://boards.straightdope.com/t/what-do-you-call-this-character/585426/40 "2011-06-15T16:26:38Z")

</div>

> [@septimus](#):
>
> Let’s avoid confusion here. My comment about DOS’s pipe had absolutely nothing to do with any command language or its syntax. It is their implementation of pipe (letting writer run to completion before starting reader) which boggles one’s imagination. Especially considering that Linux was built from scratch by a few hobbyists, while Microsoft’s budget is larger than that of some countries.

Well, DOS is a single tasking OS. UNIX/Linux is inherently a multitasking OS.

[Previous page](https://boards.straightdope.com/t/what-do-you-call-this-character/585426.md?page=1)

[Next page](https://boards.straightdope.com/t/what-do-you-call-this-character/585426.md?page=3)
