• 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: User Name in OS X +
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User Name in OS X +


  • Subject: Re: User Name in OS X +
  • From: Chris Espinosa <email@hidden>
  • Date: Thu, 24 Oct 2002 11:13:18 -0700

On Wednesday, October 23, 2002, at 08:59 AM, John Delacour <email@hidden> wrote:

I find this slightly less obscure:

do shell script "perl -e '
@p = getpwnam $ENV{USER} ;
print $p[6] '"

Note that if you just want to get the value of an environment variable, the 'system attributes' (nie 'computer') scripting addition yields the same result, without spawning a sub-process and running a perl interpreter:

system attribute "USER"

Chris
_______________________________________________
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: OS X deleteFile
  • Next by Date: Can't quit from Dock or cmd-Q
  • Previous by thread: Re: User Name in OS X +
  • Next by thread: Exists statements
  • Index(es):
    • Date
    • Thread