• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Owner/User Name in OSX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Owner/User Name in OSX


  • Subject: Re: Owner/User Name in OSX
  • From: Phil Dobbin <email@hidden>
  • Date: Sun, 28 Apr 2002 09:35:18 +0100

On Fri, 26 Apr 2002 09:24:12 -0700, John W Baxter <email@hidden> wrote:

[snip]

>[localhost:/tmp] ....% cat /tmp/n.pl
>#!/usr/bin/perl -w
>
>while (@e = getpwent) {
> print "$e[0] $e[2] $e[6]\n";
>}
>
>Now...
>do shell script "/tmp/n.pl"
>gives you a string with a user per line (UID order, except for good old
>nobody and her sometimes-negative UID):
>
>"nobody 4294967294 Unprivileged User
>root 0 System Administrator
>daemon 1 System Services
>unknown 99 Unknown User
>www 70 World Wide Web Server
>..... 501 John Baxter
>..... 502 John W. Baxter
>..... 503 John W Baxter
>..... 504 Mail test"
>
>Only the first of my users has an "easy" relationship between the short and
>the long name, and none has the default suggested by Apple's code.
>
> --John (who would actually write Python code, but Python doesn't come
>with Mac OS X)

It does come, however, in a nice binary which can be installed from the command line painlessly (v.2.1.1 - find it at python.org).

Or, of course, if you d/l Fink, you can get the latest bleeding edge version.

Regards,

Phil (who's now veering wildly off-topic ;-)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Xpress 4.11 - further colour question
  • Next by Date: Re: Getting every link from a webpage in explorer
  • Previous by thread: Re: Owner/User Name in OSX
  • Next by thread: Re: Owner/User Name in OSX
  • Index(es):
    • Date
    • Thread