in reply to How do you grab username/login id in Unix?

Hi Jeremy, Following command will give the username in windows and unix/linux getlogin() eg: my $username = getlogin(); print $username;
  • Comment on Re: How do you grab username/login id in Unix?

Replies are listed 'Best First'.
Re^2: How do you grab username/login id in Unix?
by jeremyw (Novice) on Dec 02, 2004 at 17:46 UTC
    Thanks for everyone's help. It turned out for my case that the following worked the best for my application.
    my $username = getlogin(); print $username;

    Thanks, Jeremy