|

Vertical bar

ASCII Code: 124Category: symbols

The vertical bar (|) serves as a pipe operator in Unix systems, logical OR operator in programming, and separator symbol across multiple contexts, making it essential for command-line operations and data processing.

Technical Details

ASCII Code
124
HTML Entity
|
Hexadecimal
0x7C
Binary
01111100
Octal
174

Usage & Examples

Programming

char symbol = '|'; // ASCII 124

HTML/Web

| or |

Common Uses

pipeverticalbarprogrammingunixregexlogicalseparatorcommand

How to Type This Character

Windows

Alt Code:
Hold Alt and type124 on numeric keypad
Character Map:
Search "Character Map" in Start menu

Mac

Character Viewer:
Press Ctrl +Cmd +Space
Copy & Paste:
Easiest method - copy from this page!

💡 Pro tip: The fastest way is to bookmark this page or copy the character from our ASCII library!

About the Vertical bar

Unix Pipe System

The cornerstone of Unix/Linux command chaining, enabling output from one command to become input for another (ls | grep txt | sort). This revolutionary concept transformed how developers interact with systems and process data.

Logical Operations

Represents logical OR in programming languages (||), bitwise OR operations (|), and conditional logic. Essential for decision-making in code, database queries, and algorithmic problem-solving.

Regex Alternation

Critical for regular expressions to specify alternatives (cat|dog matches both 'cat' and 'dog'). Enables powerful pattern matching in text processing, search engines, and data validation.

Data Separation

Used as delimiter in CSV files, configuration files, and database exports. The pipe character provides clean data separation while avoiding conflicts with commas and other common characters.

History of the Vertical bar

1973

Unix Pipes

Douglas McIlroy introduced pipes to Unix, creating the revolutionary concept of chaining commands that transformed how programmers work with data and systems.

1970s

Programming Logic

Programming languages adopted | for bitwise operations and || for logical OR, establishing its dual role in low-level and high-level programming contexts.

1987

Perl Regular Expressions

Perl popularized | for regex alternation, spreading its use in pattern matching across programming languages and text processing tools.

1990s

Database Systems

SQL databases and data processing systems adopted pipe as a delimiter, making it standard for data interchange and ETL processes.

2000s

Modern Frameworks

Web frameworks and modern programming languages extended pipe usage for functional programming, method chaining, and data transformation pipelines.

Cultural Impact

The pipe symbol revolutionized computing by enabling modular, composable systems where simple tools could be combined to solve complex problems, influencing modern software architecture and DevOps practices.

Usage Examples

Unix Commands

Example
ps aux | grep nginx | awk '{print $2}' | xargs kill

Chain commands to find and kill nginx processes

Programming Logic

Example
if (user.isAdmin || user.isModerator) { grantAccess(); }

Logical OR operation for conditional access control

Regular Expressions

Example
/\.(jpg|jpeg|png|gif)$/i.test(filename)

Pattern matching for image file extensions

Data Processing

Example
name|email|age\nJohn|john@email.com|25\nMary|mary@email.com|30

Pipe-delimited data format for spreadsheets and databases

Loading privacy settings...