LinuxÒÁµéÔ°ÂÛ̳'s Archiver

walkright ·¢±íÓÚ 2007-8-29 13:56

ÔõÑùʹÓùܵÀ±£´ægccµÄ±àÒëÐÅÏ¢£¿

ÎÒÔÚʹÓà gcc ±àÒë³ÌÐòʱ£¬´íÎóÐÅϢ̫¶àÁË£¬Öն˲»ÄÜÍêÈ«ÏÔʾ¡£
ÇëÎÊÔõÑùÈà gcc µÄ±àÒëÐÅÏ¢´òÓ¡µ½Ò»¸öÎļþÀï

gcc -o xxx |  >file

ÎҶԹܵÀ»¹²»ÊǺÜÀí½â£¬²»ÖªµÀÔõô°ÑshellµÄÊä³ö´òÓ¡µ½Ò»¸öÎļþÀï¡£

ÏÈлÁË£¡

dearvoid ·¢±íÓÚ 2007-8-29 14:19

gcc ... >& file

walkright ·¢±íÓÚ 2007-8-29 16:39

лл dearvoid °æÖ÷´óÈË£¡:lol

walkright ·¢±íÓÚ 2007-8-29 16:40

gcc ... >& file£¬
ÇëÎÊ & ÊÇʲôÒâË¼ÄØ£¿²»ÄÜÀí½â

dearvoid ·¢±íÓÚ 2007-8-29 17:07

[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]

wyh267 ·¢±íÓÚ 2007-8-29 18:24

¡°&¡±´ú±í³ö´íÐÅÏ¢Êä³öµ½Ö¸¶¨Îļþ

dearvoid ·¢±íÓÚ 2007-8-29 18:37

»¶Ó­ eden ÐÂÈË [color=red]wyh267[/color] :)

vforkk ·¢±íÓÚ 2007-9-3 09:47

:) :) :) :) :)

dearvoid ·¢±íÓÚ 2007-9-3 09:52

»¶Ó­ EDEN ÐÂÈË vforkk :)

Ò³: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.