Crontab/Perl piping magic
本问题已经有最佳答案,请猛点这里访问。
Possible Duplicate:
In the bash shell, what is" 2>&1"?
我最近在一个crontab中看到了这个:
1 | 5 * * * * perl /abs/path/to/my/script.pl >> /abs/path/two/my/script-log.txt 2>&1 |
如果我读得正确,它每小时运行一次
但是这个Linux/PerlVooDoo在crontab的末尾是什么?
2>&1
这是在指示Linux/Perl做什么?如果我对crontab的上述解释不正确,请为我澄清!事先谢谢!
(P)Redrect file descriptor 2(stder)over 1;it's the idiomatic way to tell/bin/sh that stder should go in the same place as stdout(p)
(P)It's bourne shell syntax to associate file descriptor 2(stder)with file descriptor 1(stdout),in effect sending stder to EDOCX1 original.(p)