pipe
operatortee
command<
", "0<
": STDIN operator (file, keyboard, mouse, ...)>
", "1>
": STDOUT operator (file, monitor, printer, ...)2>
": STDERR operator (file, monitor, printer, ...)&>
": STDOUT & STDERR operator (file, monitor, printer, ...)<
" STDIN redirection operator.0<
" STDIN redirection operator (same as "<
").<
" or "0<
" is optional,
as it's the default operator in the absence of an explicit redirection operator.<<
" that allow you to type a text that can be use a standard input for a command.command <<FLAG <ENTER> text <ENTER> ... FLAG<ENTER>
>
" STDOUT redirection operatorls -al
" in the file "file1":
1>
" STDOUT redirection operator (same as ">
")ls -al
" in the file "file1":>>
" STDOUT redirection operator + appendls -al
" in the file "file1":1>>
" STDOUT redirection operator + append (same as >>
)ls -al
" in the file "file1":2>
" STDERR redirection operatorls: -: No such file or directory
) of the comand "ls -
" in the file "file1":2>>
" STDERR redirection operator + appendls: -: No such file or directory
) of the comand "ls -
" in the file "file1":1>&2
" redirect STDOUT to the same "stream" as STDERRls -al
" to the same "stream" as STDERR ("file1"):2>&1
" redirect STDERR to the same "stream" as STDOUTls: -: No such file or directory
) of the command "ls -
" to the same "stream" as STDOUT ("file1"):
/dev/null
:
&>
" both STDOUT and STDERR redirection operator.ls -al
" in the file "file1":ls: -: No such file or directory
) of the comand "ls -
" in the file "file1":
pipe
operator
pipe
operator redirects the output of a command (on the left of the pipe) as input to the next command (on the right of the pipe).tee
command
tee
command redirects the output of a script to files and STDOUT.