|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
下面这些bash 重定向语法有哪些具体例子呢?
n>&:Duplicate standard output to file descriptor n.
n<&:Duplicate standard input from file descriptor n.
n>&m:File descriptor n is made to be a copy of the output file descriptor.
n<&m:File descriptor n is made to be a copy of the input file descriptor.
&>file:Directs standard output and standard error to file.
<&-:Close the standard input.
>&-:Close the standard output.
n>&-:Close the output from file descriptor n.
n<&-:Close the input from file descriptor n.
n>&word:If n is not specified, the standard output (file descriptor 1) is used. If the digits in word do not specify a file descriptor open for output, a redirection error occurs. As a special case, if n is omitted, and word does not expand to one or more digits, the standard output and standard error are redirected as described previously.
n<&word:If word expands to one or more digits, the file descriptor denoted by n is made to be a copy of that file descriptor. If the digits in word do not specify a file descriptor open for input, a redirection error occurs. If word evaluates to -, file descriptor n is closed. If n is not specified, the standard input (file descriptor 0) is used.
n>&digit-:Moves the file descriptor digit to file descriptor n, or the standard output (file descriptor 1) if n is not specified.
n<&digit-:Moves the file descriptor digit to file descriptor n, or the standard input (file descriptor 0) if n is not specified. digit is closed after being duplicated to n. |
|