Movatterモバイル変換


[0]ホーム

URL:


CFEngine documentation homepage

getgid

Suggest changes
Table of contents

Prototype:getgid(groupname)

Return type:int

Description: Return the integer group id of the groupgroupname on thishost.

If the named group does not exist, the function will fail and the variablewill not be defined.

Arguments:

  • groupname:string - Group name in text - in the range:.*

Example:

code
bodycommoncontrol{bundlesequence=>{"example"};}bundleagentexample{vars:linux|solaris|hpux::"gid"int=>getgid("root");freebsd|darwin|openbsd::"gid"int=>getgid("wheel");aix::"gid"int=>getgid("system");reports:"root's gid is$(gid)";}

Output:

code
R: root's gid is 0

Notes:On Windows, which does not support group ids, the variable will not bedefined.

Still need help?

Chat Ask a question on Github Mailing list
Version 
master3.24 (LTS)3.21 (LTS)view all versions

[8]ページ先頭

©2009-2025 Movatter.jp