• 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: Determine user dir from postinstall while root [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determine user dir from postinstall while root [SOLVED]


  • Subject: Re: Determine user dir from postinstall while root [SOLVED]
  • From: Chris Devers <email@hidden>
  • Date: Thu, 26 Jul 2007 23:09:09 -0700

On Jul 26, 2007, at 7:38 AM, Knud Hinnerk Möller wrote:

Ah, thanks! I didn't even know this variable existed...

And just for the record, this is how I access it from Perl:

my $USER = `echo \$USER`;
chomp($USER);

No need to spawn a subshell to just get an environment variable.

In simpler Perl, that would just be:

    my $USER = $ENV{USER}

As, for example:

    $ perl -le 'print $ENV{USER}'
    knud.moeller
    $

or whatever. :-)


-- Chris Devers

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Determine user dir from postinstall while root (From: Stéphane Sudre <email@hidden>)
 >Re: Determine user dir from postinstall while root [SOLVED] (From: Knud Hinnerk Möller <email@hidden>)

  • Prev by Date: Re: Permissions weirdness
  • Next by Date: Dist files and localization
  • Previous by thread: Re: Determine user dir from postinstall while root [SOLVED]
  • Next by thread: Dist files and localization
  • Index(es):
    • Date
    • Thread