POSIX_GETEGID(3) 1 POSIX_GETEGID(3)posix_getegid - Return the effective group ID of the current processSYNOPSIS
int posix_getegid (void )
DESCRIPTION
Return the numeric effective group ID of the current process.
RETURN VALUES
Returns an integer of the effective group ID.
EXAMPLES
Example #1
posix_getegid(3) example
This example will print out the effective group id, once it is changed with posix_setegid(3).
<?php
echo 'My real group id is '.posix_getgid(); //20
posix_setegid(40);
echo 'My real group id is '.posix_getgid(); //20
echo 'My effective group id is '.posix_getegid(); //40
?>
NOTES posix_getegid(3) is different than posix_getgid(3) because effective group ID can be changed by a calling process using posix_setegid(3).
SEE ALSO posix_getgrgid(3), posix_getgid(3), posix_setgid(3).
PHP Documentation Group POSIX_GETEGID(3)
Check Out this Related Man Page
POSIX_GETGRGID(3) 1 POSIX_GETGRGID(3)posix_getgrgid - Return info about a group by group idSYNOPSIS
array posix_getgrgid (int $gid)
DESCRIPTION
Gets information about a group provided its id.
PARAMETERS
o $gid
- The group id.
RETURN VALUES
The array elements returned are:
The group information array
+--------+---------------------------------------------------+
|Element | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| name | |
| | |
| | The name element contains the name of the group. |
| | This is a short, usually less than 16 character |
| | "handle" of the group, not the real, full name. |
| | |
|passwd | |
| | |
| | The passwd element contains the group's password |
| | in an encrypted format. Often, for example on a |
| | system employing "shadow" passwords, an asterisk |
| | is returned instead. |
| | |
| gid | |
| | |
| | Group ID, should be the same as the $gid parame- |
| | ter used when calling the function, and hence |
| | redundant. |
| | |
|members | |
| | |
| | This consists of an array of string's for all |
| | the members in the group. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Example use of posix_getgrgid(3)
<?php
$groupid = posix_getegid();
$groupinfo = posix_getgrgid($groupid);
print_r($groupinfo);
?>
The above example will output something similar to:
Array
(
[name] => toons
[passwd] => x
[members] => Array
(
[0] => tom
[1] => jerry
)
[gid] => 42
)
SEE ALSO posix_getegid(3), posix_getgrnam(3), filegroup(3), stat(3), safe_mode_gid, POSIX man page GETGRNAM(3).
PHP Documentation Group POSIX_GETGRGID(3)
Is there any way that I can mailx to a distribution list without having a $HOME/.mailrc file?
We have a distribution list in Outlook for our group say group@something.com.
I am trting to do echo "Something"|mailx -s "Subject" group@something.com
it doesnt work
Any ideas?
Thanks (1 Reply)
Hi all,
I want transfer the echo data into file.txt.how?
echo " $dir $group " >> ${file.txt}
---------- Post updated at 04:11 PM ---------- Previous update was at 03:10 PM ----------
anybody can help ?
i mean in script output like
echo " hello"
i want transfer that output to file.txt. (4 Replies)
Hi,
I have 2 input files:
File 1:
echo Name > create_Name.txt
echo Group /dir/group, Name >> create_Name.txt
File 2:
Name AAA BBB CCC
group A B C
dir A1 B1 C1
................................
Need to replace the contents of File 1 with column 2, 3 & 4 values of File 2... (8 Replies)