printf

PRINTF(1)                          ç¨æ·å½ä»¤                         PRINTF(1)



å称
       printf - æ ¼å¼å并æ¾ç¤ºæ°æ®

æ¦è¿°
       printf æ ¼å¼[åæ°å表]...
       printf é项

æè¿°
       æç§æå®æ ¼å¼æå°åæ°å表ä¸çåæ°ææç§é项æ§è¡ï¼

       --help æ¾ç¤ºæ¤å¸®å©ä¿¡æ¯å¹¶éåº

       --version
              æ¾ç¤ºçæ¬ä¿¡æ¯å¹¶éåº

       æ ¼å¼ä»¥ C printf çæ¹å¼æ§å¶è¾åºã转ä¹åºåå¦ä¸ï¼

       \"     åå¼å·

       \\     åæ线

       \a     æ¥è¦ç¬¦(BEL)

       \b     éæ ¼ç¬¦

       \c     ç¦æ¢å°¾éçæ¢è¡ç¬¦

       \e     escape å符

       \f     æ¢é¡µç¬¦

       \n     å¦èµ·ä¸è¡

       \r     åå°è¡é¦

       \t     æ°´å¹³å¶è¡¨ç¬¦

       \v     åç´å¶è¡¨ç¬¦

       \NNN   åèæ°ä»¥å«è¿å¶æ° NNN (1è³3ä½)表示

       \xHH   åèæ°ä»¥ååè¿å¶æ° HH (1è³2ä½)表示

       \uHHHH Unicode (ISO/IEC 10646) å符ï¼æ¯ 16è¿å¶å¼ HHHHï¼4ä½ï¼

       \UHHHHHHHH
              Unicode å符ï¼æ¯ 16è¿å¶å¼ HHHHHHHHï¼8ä½ï¼

       %%     å个 %

       %b     åæ°å表ä½ä¸ºå符串ï¼å¶ä¸ '\' å‐
              符被转ä¹ï¼é¤äºå«è¿å¶è½¬ä¹æ ¼å¼å为 \0 æ \0NNN

       %q     åæ°å表以ä¸ç§å¯è¢« shell è¾åºéæ°è¯»åçæ ¼å¼è¿è¡è¾åºï¼å¹¶ä½¿ç¨
              POSIX å»ºè®®ç  $” è¯æ³å¯¹ä¸å¯æå°å符è¿è¡è½¬ä¹ã

       并ä¸ææ C æ ¼å¼è§èç转ä¹å°ç± diouxXfeEgGcs ä¸çæ个å‐
       符ä½ä¸ºç»æï¼ä¸âåæ°å表âå°è¢«é¦å转æ¢ä¸ºéå½çæ ¼å¼ãåé宽度声æä¹ä¼è¢«å¤çã

       注æï¼æ¨ç shell å¯è½åç½®äºèªå·±ç printf
       ç¨åºçæ¬ï¼å®é常ä¼è¦çè¿éææåçç¸åºçæ¬ã请æ¥éæ¨ç shell ææ¡£è·ç¥å®ææ¯æçé项ã

ä½è
       ç± David MacKenzie ç¼åã

æ¥åé误
       GNU coreutils çå¨çº¿å¸®å©ï¼ <http://www.gnu.org/software/coreutils/>
       请å <http://translationproject.org/team/zh_CN.html> æ¥å printf
       çç¿»è¯é误ã

çæ
       Copyright © 2017 Free Software Foundation, Inc.  License GPLv3+: GNU
       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
       This is free software: you are free to change and redistribute it.
       There is NO WARRANTY, to the extent permitted by law.

åè§
       printf(3)

       å®æ´æ档请è§ï¼ <http://www.gnu.org/software/coreutils/printf>
       æèå¨æ¬å°ä½¿ç¨ï¼ info '(coreutils) printf invocation'

è·
       æ¬é¡µé¢ä¸æçç±ä¸æ man æå页计åæä¾ã
       ä¸æ man æå页计åï¼https://github.com/man-pages-zh/manpages-zh



GNU coreutils 8.28                2017å¹´10æ                         PRINTF(1)