This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
linux:pipe [2018/03/20 15:49] – [Pipe to a file] tmade | linux:pipe [2019/06/05 11:40] – [Pipe to a file] tmade | ||
---|---|---|---|
Line 7: | Line 7: | ||
==== Pipe to a file ==== | ==== Pipe to a file ==== | ||
- | (stdin) | + | (stdin) |
- | (stdout) 1 #Standart | + | (stdout) 1 #Standard |
- | (stderr) 2 #Standart | + | (stderr) 2 #Standard |
- | > # | + | > # |
- | 1> # | + | 1> # |
- | 2> # | + | 2> # |
Examples: | Examples: | ||
- | ls /opt/ /otherfile > list 2>& | + | ls /opt/ /otherfile > file 2>& |
- | echo "This is a test" 1> / | + | ls /opt/ /otherfile > file 1>& |
+ | |||
+ | echo "This is a test" 1> / | ||
ls xyz > info.txt 2> error.txt | ls xyz > info.txt 2> error.txt | ||
ls /opt / | ls /opt / | ||
- | 2> / | + | 2> / |
- | 2>> | + | 2>> |
| | ||
**Explication check:** | **Explication check:** | ||
man -Len -Pless\ +/ | man -Len -Pless\ +/ | ||
- | | ||
==== Execution Dependency ==== | ==== Execution Dependency ==== | ||