Pipes
with other Linux commands, such as ls or more, so that the
InLinux, you can combine filters sent as standard input to another filter or
command can be
standard output of one filter or
command.
the current directory, youneed to type the
For example, to display all the contents of
following commands:
$ls > tempfile
$mOre tempfile
command stores a list of the directories in the file tempfile. The tempfile file is
Here,the Is
then used as input by the more command.
combined and executed as a
By using the Linux pipe feature, the above two steps can be
single command without creating a temporary file, asshown below:
$ ls | mOre
The vertical bar () is the pipe character. which indicates that the output of the command
typed before the | is to be sent as input to the command typed after the |.
Note: On the keyboard, the pipe character () appears as a broken vertical line.
with other Linux commands, such as ls or more, so that the
InLinux, you can combine filters sent as standard input to another filter or
command can be
standard output of one filter or
command.
the current directory, youneed to type the
For example, to display all the contents of
following commands:
$ls > tempfile
$mOre tempfile
command stores a list of the directories in the file tempfile. The tempfile file is
Here,the Is
then used as input by the more command.
combined and executed as a
By using the Linux pipe feature, the above two steps can be
single command without creating a temporary file, asshown below:
$ ls | mOre
The vertical bar () is the pipe character. which indicates that the output of the command
typed before the | is to be sent as input to the command typed after the |.
Note: On the keyboard, the pipe character () appears as a broken vertical line.