`
switchlau
  • 浏览: 54112 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
社区版块
存档分类
最新评论

Redirect Operators and File Descriptors

 
阅读更多

<&n redirect standard input from file descriptor n
>&n redirect standard output to file descriptor n
n<file redirect file descriptor n from file
n>file redirect file descriptor n to file
n>>file redirect file descriptor n to file. Create file if non-existent, else overwrite.
n>| file redirect file descriptor n to file. Create file even if noclobber is enabled.
n<&m redirect file descriptor n input from file descriptor m
n>&m redirect file descriptor n output to file descriptor m
n<>file open file for reading and writing as file descriptor n
n<<word redirect to file descriptor n until word is read
n<<-word redirect to file descriptor n until word is read; ignore leading tabs
n<&- close file descriptor n for standard input
n>&- close file descriptor n for standard output
print &un args redirect arguments to file descriptor n. If n is greater than 2, it must first be opened with exec. If n is not specified, the default file descriptor argument is 1 (standard output).
read &un args read input line from file descriptor n. If n is greater than 2, it must first be opened with exec. If n is not specified, the default file descriptor argument is 0 (standard input).
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics