• 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: Two related questions:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two related questions:


  • Subject: Re: Two related questions:
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 19 Sep 2002 11:45:39 -0700

On 9/19/02 9:55 AM, "John C. Welch" <email@hidden> wrote:

> On 09/19/2002 06:43, "Philip Aker" <email@hidden> wrote:
>
>>> 1) (I know this has come up , but I can't remember my userid/passsword
>>> for the archives, so forgive me) How does one go about getting the
>>> currentlogged in user short name, aka userid
>>
>> set uname to (do shell script "id -un")
>> set uid to (do shell script "id -u")
>> uname & "=" & uid
>
> The easier way is whoami....gives me what I want ;-)

Here's another way, without shell scripting:

system attribute "USER"


(That may even work pre-OS X as

tell app "Finder" to computer "USER"

but I have no idea what it gets you if it does.)
--
Paul Berkowitz
_______________________________________________
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.

  • Follow-Ups:
    • Re: Two related questions:
      • From: John W Baxter <email@hidden>
References: 
 >Re: Two related questions: (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: Unicode to plain text ( funklessly )
  • Next by Date: Re: Mail UTF-7 Script -- final
  • Previous by thread: Re: Two related questions:
  • Next by thread: Re: Two related questions:
  • Index(es):
    • Date
    • Thread