Back
Asciify Logo
Asciify

Vertical Line

| (Vertical Line) is ASCII code point 124 (0x7C), Unicode U+007C, and a printable punctuation character. It draws a straight vertical stroke — a clean, upright divider that in prose occasionally separates alternatives in linguistic notation or stands between items in a table, though most people outside programming rarely type it. Code gives the pipe character relentless employment. In Unix shells, it chains commands together: cat file | grep "error" | wc -l sends each program's output into the next program's input, a compositional elegance that defines the Unix philosophy. C-family languages use | for bitwise OR and || for logical OR with short-circuit evaluation. JavaScript and Python recently adopted | for additional duties — JavaScript's pipeline proposal and Python's type union syntax (int | str in type hints) both lean on it. CSS uses it in selectors for attribute matching, and regular expressions treat | as alternation: cat|dog matches either word. The trap is a shell classic: in a pipeline, each command runs in a subshell, so variable assignments inside a piped while read loop vanish when the loop ends. Developers set a variable confidently inside the loop, use it afterward, and find it empty — the pipe created an invisible boundary that swallowed their state. The vertical bar's computing origins trace to Bob Bemer's ASCII work in the 1960s, where it was included partly to support logical OR notation in early programming languages. UTF-8 encodes it as a single byte 0x7C. Unicode classifies it as Sm (Symbol, Math) with the name VERTICAL LINE. The broken bar ¦ (U+00A6) is its fractured sibling — once common on European keyboards and occasionally still aliased to the same physical key, producing mysterious syntax errors when it lands in a shell script instead of the solid pipe the parser expects.

Symbol

Technical Details

Code Example

</>
unsigned flags = 0x02 | 0x08; // combine bit flags
if (flags & 0x08) flags |= 0x01; // set an additional bit
unsigned masked = flags | 0x80; // force high bit on

Frequently Asked Questions

  • The | (pipe) sends one command's output as input to the next: ls | grep '.txt' | sort. Doug McIlroy proposed it in 1973, and it became Unix's defining feature. Pipes enable composing simple tools into powerful processing chains without intermediate files.

  • | is the bitwise OR operator (5 | 3 = 7, binary: 101 | 011 = 111). || is the logical OR with short-circuit evaluation — if the left side is true, the right side isn't evaluated. In shells, || runs the second command only if the first fails (to set defaults).

  • | creates union types: string | number means 'either a string or a number.' It's TypeScript's way of expressing alternatives. Combined with type narrowing (if/typeof checks), union types enable type-safe handling of multiple possible values without resorting to 'any.'

  • | means 'or' (alternation): cat|dog matches either 'cat' or 'dog.' It has the lowest precedence in regex, so abc|def matches 'abc' OR 'def', not 'ab(c|d)ef.' Use parentheses for more precise alternation: (cat|dog) food matches 'cat food' or 'dog food.'

@workani&@alexluthor
Privacy & legal

Privacy

No accounts, no ads, no tracking cookies, and no cross-site tracking. The only analytics we keep are faceless — anonymous, aggregated counts of pages and searches, never tied to you. We store no IP addresses, set no tracking cookies, and build no profiles. Cloudflare hosts the site and handles requests for delivery and security.

Full privacy policy·Extension privacy·legal@asciify.dev

Attributions & licenses

Twemoji
© Twitter, Inc and other contributors · CC-BY 4.0
Noto Color Emoji
© Google · Apache 2.0
Fluent UI Emoji
© Microsoft · MIT
OpenMoji
© HfG Schwäbisch Gmünd · CC-BY-SA 4.0
Toss Face
© Viva Republica (Toss) · SIL OFL 1.1
JoyPixels
© JoyPixels Inc. · Free Limited Use License
SerenityOS Emoji
© The SerenityOS Developers · BSD-2-Clause
EmojiTwo
© EmojiTwo contributors · CC-BY 4.0
Apple Color Emoji
© Apple, Inc.
Facebook Emoji
© Meta Platforms, Inc.

Apple and Facebook emoji styles are proprietary and shown here solely for reference and comparison — a common-sense application of nominative-use / fair-use principles. asciify is not affiliated with, endorsed by, or sponsored by Apple, Inc., Meta Platforms, Inc., or any other rights holder listed above. If a rights holder requests removal of their emoji style from this site, it will be removed.

All other vendor emoji are reproduced for reference and comparison under their respective open licenses listed above.

Character names and code points from the Unicode® Standard. Unicode® and the Unicode Logo are registered trademarks of Unicode, Inc.

Privacy
© asciify.dev 2025-2026