What | means
It can connect commands or separate alternatives. In Bash, a program for running typed commands, command1 | command2 sends the first command’s standard output—the results it normally prints—to the second as input. Read this pipe as “send the result onward,” not “pick either command.”
In a JavaScript regular expression—a pattern used to match text—a|b matches either a or b. Here the vertical bar offers a choice, not a connection. Check which language or command environment you are reading before treating | as “or.”
How do I type the pipe symbol?
On a standard US layout, press Shift + backslash. Look for the key marked \; its position varies by keyboard.
If another character appears, check your active keyboard layout: the layout selected in your operating system can differ from the labels printed on the keys.
Don't confuse it with
5Combination ideas
3Questions people ask
1Why does | show as a box on some devices?
Because that device's fonts have no glyph for it. The character is still correct and still copies correctly — the box is a missing glyph, not a broken character.
How to type |
|\007CCodes and encoding1 code points
A visible symbol can contain several code points. JS .length counts UTF-16 units; UTF-8 counts bytes.

