ÔõÑùʹÓùܵÀ±£´ægccµÄ±àÒëÐÅÏ¢£¿
ÎÒÔÚʹÓà gcc ±àÒë³ÌÐòʱ£¬´íÎóÐÅϢ̫¶àÁË£¬Öն˲»ÄÜÍêÈ«ÏÔʾ¡£ÇëÎÊÔõÑùÈà gcc µÄ±àÒëÐÅÏ¢´òÓ¡µ½Ò»¸öÎļþÀï
gcc -o xxx | >file
ÎҶԹܵÀ»¹²»ÊǺÜÀí½â£¬²»ÖªµÀÔõô°ÑshellµÄÊä³ö´òÓ¡µ½Ò»¸öÎļþÀï¡£
ÏÈлÁË£¡ gcc ... >& file лл dearvoid °æÖ÷´óÈË£¡:lol gcc ... >& file£¬
ÇëÎÊ & ÊÇʲôÒâË¼ÄØ£¿²»ÄÜÀí½â [quote]ÔÌûÓÉ [i]walkright[/i] ÓÚ 2007-8-29 16:40 ·¢±í [url=http://www.linuxeden.com/forum/redirect.php?goto=findpost&pid=582261&ptid=158484][img]http://www.linuxeden.com/forum/images/common/back.gif[/img][/url]
gcc ... >& file£¬
ÇëÎÊ & ÊÇʲôÒâË¼ÄØ£¿²»ÄÜÀí½â [/quote]
[font=Courier New][code]
Redirecting Standard Output and Standard Error
Bash allows both the standard output (file descriptor 1) and the stan-
dard error output (file descriptor 2) to be redirected to the file
whose name is the expansion of word with this construct.
There are two formats for redirecting standard output and standard
error:
&>word
and
>&word
Of the two forms, the first is preferred. This is semantically equiva-
lent to
>word 2>&1
[/code][/font] ¡°&¡±´ú±í³ö´íÐÅÏ¢Êä³öµ½Ö¸¶¨Îļþ »¶Ó eden ÐÂÈË [color=red]wyh267[/color] :) :) :) :) :) :) »¶Ó EDEN ÐÂÈË vforkk :)
Ò³:
[1]