Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Or, alternatively, which is probably infinitesimally slower and infinitesimally more self-documenting. But I happen to have used that particular idiom, so I thought I'd throw it in. :-) Update: in the spirit of actually adding something to the discussion, I should point out that there is an entire class of built-in functions to deal with users and groups, named things like getpwnam, getgrent, getgrgid and the like, which you should look at if you ever so much as think of directly accessing /etc/passwd directly (you can find the complete list under "Fetching user and group info" here). Update 2: fields 5 and 6 are identical here, too (SGI), FWIW. And I hadn't considered su, but it seems like that will cause issues not matter what you do, yes? If God had meant us to fly, he would *never* have give us the railroads. --Michael Flanders In reply to Re: Re: any efficient way to get user's full name?
by ChemBoy
|
|