Re: Determine user dir from postinstall while root [SOLVED]
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