Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Options for the | (pipe) command

Tags:

shell

unix

Does the Unix | (pipe) command have any options?

like image 460
MBU Avatar asked Jan 14 '11 07:01

MBU


People also ask

What is option in commands?

An option, also referred to as a flag or a switch, is a single-letter or full word that modifies the behavior of a command in some predetermined way. A command is an instruction telling a computer to do something, usually to launch a program.

What are Unix command options?

In the original Unix tradition, command-line options are single letters preceded by a single hyphen. Mode-flag options that do not take following arguments can be ganged together; thus, if -a and -b are mode options, -ab or -ba is also correct and enables both.


1 Answers

In short, no, but you can get the exit values of each of the commands in the pipe via $PIPESTATUS. You can change the behavior of it's return value via the shell option shopt -s pipefail and you can change how much is buffered from command to command via ulimit -p

like image 158
SiegeX Avatar answered Oct 18 '22 11:10

SiegeX