<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## fgetgrent ## 從指定的文件來讀取組格式 ### 相關函數 ### fgetpwent ### 表頭文件 ### ``` #include<grp.h> #include<stdio.h> #include<sys/types.h> ``` ### 定義函數 ### ``` struct group *getgrent(FILE *stream); ``` ### 函數說明 ### fgetgrent()會從參數stream指定的文件讀取一行數據,然后以group結構將該數據返回。參數stream所指定的文件必須和、etc/group相同的格式。group結構定義請參考getgrent()。 ### 返回值 ### 返回group結構數據,如果返回NULL則表示已無數據,或有錯誤發生。 ### 范例 ### ``` #include <grp.h> #include<sys/types.h> #include<stdio.h> main() { struct group *data; FILE *stream; int i; stream = fopen("/etc/group", "r"); while((data = fgetgrent(stream))!=0){ i=0; printf("%s :%s:%d :", data->gr_name,data->gr_passwd,data->gr_gid); while (data->gr_mem[i])printf("%s,",data->gr_mem[i++]); printf("\n"); } fclose(stream); } ``` ### 執行 ### ``` root:x:0:root, bin:x:1:root,bin,daemon daemon:x:2:root,bin,daemon sys:x:3:root,bin,adm adm:x:4:root,adm,daemon tty:x:5 disk:x:6:root lp:x:7:daemon,lp mem:x:8 kmem:x:9 wheel:x:10:root mail:x:12:mail news:x:13:news uucp:x:14:uucp man:x:15 games:x:20 gopher:x:30 dip:x:40: ftp:x:50 nobody:x:99: ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看